Table of Contents

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

T

The type of the payload returned on success.

Inheritance
Response<T>
Implements
Inherited Members

Properties

Data

The response payload, or null when the call failed.

public T? Data { get; init; }

Property Value

T

Error

Error detail provided by the server when IsSuccess is false.

public ErrorMessage? Error { get; init; }

Property Value

ErrorMessage

IsSuccess

true if the server processed the request successfully.

public bool IsSuccess { get; init; }

Property Value

bool