rest_mediatekdocuments

Error extends Result
in package

FinalYes
Tags
template
template
extends

Table of Contents

Properties

$value  : E

Methods

create()  : Result<T, F>
Create a new error value.
error()  : Option<string|int, E>
Get the error option value.
flatMap()  : Result<S, F>
Flat map over the success value.
map()  : Result<S, E>
Map over the success value.
mapError()  : Result<T, F>
Map over the error value.
success()  : Option<string|int, T>
Get the success option value.
__construct()  : void
Internal constructor for an error value.

Properties

Methods

create()

Create a new error value.

public static create(F $value) : Result<T, F>
Parameters
$value : F
Tags
template
Return values
Result<T, F>

error()

Get the error option value.

public error() : Option<string|int, E>
Return values
Option<string|int, E>

flatMap()

Flat map over the success value.

public flatMap(callable(T): Result<S, F$f) : Result<S, F>
Parameters
$f : callable(T): Result<S, F>
Tags
template
template
Return values
Result<S, F>

map()

Map over the success value.

public map(callable(T): S $f) : Result<S, E>
Parameters
$f : callable(T): S
Tags
template
Return values
Result<S, E>

mapError()

Map over the error value.

public mapError(callable(E): F $f) : Result<T, F>
Parameters
$f : callable(E): F
Tags
template
Return values
Result<T, F>

success()

Get the success option value.

public success() : Option<string|int, T>
Return values
Option<string|int, T>

__construct()

Internal constructor for an error value.

private __construct(E $value) : void
Parameters
$value : E

        
On this page

Search results