Class Response<T>
- Namespace
- RustPlusApi.Data
- Assembly
- RustPlusApi.dll
Generic wrapper returned by every Rust+ API call, carrying success state, data and an optional error.
public sealed record Response<T> : IEquatable<Response<T>>
Type Parameters
TThe type of the payload returned on success.
- Inheritance
-
Response<T>
- Implements
-
IEquatable<Response<T>>
- Inherited Members
Properties
Data
The response payload, or null when the call failed.
public T? Data { get; init; }
Property Value
- T
Error
public ErrorMessage? Error { get; init; }
Property Value
IsSuccess
true if the server processed the request successfully.
public bool IsSuccess { get; init; }