SocketOp Module

The module

Nested modules

Modules Description

Operators

Functions and values

Function or value Description

abort x

Full Usage: abort x

Parameters:
Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a

create a new unsuccessful value

x : Error
Returns: SocketOp<'a>

bind fCont value

Full Usage: bind fCont value

Parameters:
Returns: SocketOp<'b>
Modifiers: inline
Type parameters: 'a, 'b

Bind the result successful result of the SocketOp to fCont

fCont : 'a -> SocketOp<'b>
value : SocketOp<'a>
Returns: SocketOp<'b>

bindError fCont value

Full Usage: bindError fCont value

Parameters:
Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a

Bind the error result of the SocketOp to fCont

fCont : Error -> SocketOp<'a>
value : SocketOp<'a>
Returns: SocketOp<'a>

map f value

Full Usage: map f value

Parameters:
Returns: SocketOp<'b>
Modifiers: inline
Type parameters: 'a, 'b

Map f over the contained successful value in SocketOp

f : 'a -> 'b
value : SocketOp<'a>
Returns: SocketOp<'b>

mapError f value

Full Usage: mapError f value

Parameters:
Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a

Map f over the error value in SocketOp

f : Error -> Error
value : SocketOp<'a>
Returns: SocketOp<'a>

mreturn x

Full Usage: mreturn x

Parameters:
    x : 'T

Returns: SocketOp<'T>
Modifiers: inline
Type parameters: 'T

create a new successful value

x : 'T
Returns: SocketOp<'T>

ofAsync a

Full Usage: ofAsync a

Parameters:
Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a

lift a Async<'a> type to the SocketOp

a : Async<'a>
Returns: SocketOp<'a>

ofTask value

Full Usage: ofTask value

Parameters:
Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a

Convert Task-based to ValueTask-based SocketOp

value : Task<Result<'a, Error>>
Returns: SocketOp<'a>

orInputError (arg1, arg2) _arg1

Full Usage: orInputError (arg1, arg2) _arg1

Parameters:
    arg0 : int option
    arg1 : string
    _arg1 : Choice<'a, 'b>

Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a, 'b

says that something is wrong with the input on a protocol level and that it's therefore a bad request (user input error) -- the error already present is overwritten with the errorMsg parameter.

arg0 : int option
arg1 : string
_arg1 : Choice<'a, 'b>
Returns: SocketOp<'a>

orInputErrorf fErrorMsg _arg1

Full Usage: orInputErrorf fErrorMsg _arg1

Parameters:
    fErrorMsg : string -> int option * string
    _arg1 : Result<'a, string>

Returns: SocketOp<'a>
Modifiers: inline
Type parameters: 'a

same as the above, but let's you do something with the existing error message through the callback function passed

fErrorMsg : string -> int option * string
_arg1 : Result<'a, string>
Returns: SocketOp<'a>

toTask value

Full Usage: toTask value

Parameters:
Returns: Task<Result<'a, Error>>
Modifiers: inline
Type parameters: 'a

Convert ValueTask-based SocketOp to Task-based for compatibility

value : SocketOp<'a>
Returns: Task<Result<'a, Error>>