Struct Response<T>
- Namespace
- The.RPC
- Assembly
- Instagile.dll
[MessagePackObject(false)]
public struct Response<T>
Type Parameters
T
- Inherited Members
-
Fields
Detail
[Key(1)]
public readonly string? Detail
Field Value
- string
Error
[Key(2)]
public readonly AuthenticationFailure? Error
Field Value
- AuthenticationFailure
Type
[Key(0)]
public readonly ResponseType Type
Field Value
- ResponseType
Value
[Key(3)]
public readonly T? Value
Field Value
- T
Properties
ErrorMessage
[IgnoreMember]
public string? ErrorMessage { get; }
Property Value
- string
HasValue
[IgnoreMember]
public bool HasValue { get; }
Property Value
- bool
Methods
InternalError(string)
public static Response<T> InternalError(string cause)
Parameters
cause string
Returns
- Response<T>
PermanentFailure(string)
public static Response<T> PermanentFailure(string cause)
Parameters
cause string
Returns
- Response<T>
SecurityError(AuthenticationFailure)
public static Response<T> SecurityError(AuthenticationFailure code)
Parameters
code AuthenticationFailure
Returns
- Response<T>
SelectError<U>()
public Response<U> SelectError<U>()
Returns
- Response<U>
Type Parameters
U
Select<U>(Func<T, U>)
public Response<U> Select<U>(Func<T, U> f)
Parameters
f Func<T, U>
Returns
- Response<U>
Type Parameters
U
Success(T)
public static Response<T> Success(T value)
Parameters
value T
Returns
- Response<T>
TemporaryFailure(string)
public static Response<T> TemporaryFailure(string cause)
Parameters
cause string
Returns
- Response<T>
TransportError(string)
public static Response<T> TransportError(string cause)
Parameters
cause string
Returns
- Response<T>