Barotrauma Client Doc
Barotrauma.Result< T, TError > Class Template Referenceabstract
Inheritance diagram for Barotrauma.Result< T, TError >:
Barotrauma.Failure< T, TError > Barotrauma.Success< T, TError >

Public Member Functions

abstract bool TryUnwrapSuccess ([MaybeNullWhen(returnValue:false)] out T value)
 
abstract bool TryUnwrapFailure ([MaybeNullWhen(returnValue:false)] out TError value)
 
abstract override? string ToString ()
 

Static Public Member Functions

static Result< T, TError > Success (T value)
 
static Result< T, TError > Failure (TError error)
 

Static Public Attributes

static Func< T, Result< T, TError > > Success
 

Properties

abstract bool IsSuccess [get]
 
bool IsFailure [get]
 

Detailed Description

Type Constraints
T :notnull 
TError :notnull 

Definition at line 7 of file Result.cs.

Member Function Documentation

◆ Failure()

static Result<T, TError> Barotrauma.Result< T, TError >.Failure ( TError  error)
static

◆ Success()

static Result<T, TError> Barotrauma.Result< T, TError >.Success ( value)
static

◆ ToString()

abstract override? string Barotrauma.Result< T, TError >.ToString ( )
pure virtual

◆ TryUnwrapFailure()

abstract bool Barotrauma.Result< T, TError >.TryUnwrapFailure ( [MaybeNullWhen(returnValue:false)] out TError  value)
pure virtual

◆ TryUnwrapSuccess()

abstract bool Barotrauma.Result< T, TError >.TryUnwrapSuccess ( [MaybeNullWhen(returnValue:false)] out T  value)
pure virtual

Member Data Documentation

◆ Success

Func<T, Result<T, TError> > Barotrauma.Result< T, TError >.Success
static

Definition at line 25 of file Result.cs.

Property Documentation

◆ IsFailure

bool Barotrauma.Result< T, TError >.IsFailure
get

Definition at line 12 of file Result.cs.

◆ IsSuccess

abstract bool Barotrauma.Result< T, TError >.IsSuccess
get

Definition at line 11 of file Result.cs.