ServerFunctionRef<I, O> class final

Typed reference to a server function that returns one value.

Available extensions

Constructors

ServerFunctionRef({required String id, HttpMethod method = HttpMethod.post, ValueEncoder<I>? encodeInput, ValueDecoder<O>? decodeOutput})
Creates a reference emitted by the route compiler.
const

Properties

decodeOutput → ValueDecoder<O>?
Optional decoder for the serialized result.
final
encodeInput → ValueEncoder<I>?
Optional encoder applied before the input reaches Serializer.
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
Stable function identifier in the server manifest.
final
method → HttpMethod
HTTP method used to invoke the function.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(RpcClient client, I data, {Future<void>? cancelled}) → Future<O>
Invokes this function through client.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read(RpcClient rpc, I input, {required List<String> scope, QueryPolicy policy = const QueryPolicy()}) → QueryOptions<O>

Available on ServerFunctionRef<I, O>, provided by the RpcReadOptions extension

Snapshots this input with this ref's codec and the client's serializer.
readAt(RpcClient rpc, I input, {required List<String> scope}) → QueryFilter

Available on ServerFunctionRef<I, O>, provided by the RpcReadOptions extension

Selects one ordinary read by its canonical encoded input.
reads(RpcClient rpc, {required List<String> scope}) → QueryFilter

Available on ServerFunctionRef<I, O>, provided by the RpcReadOptions extension

Selects this function's ordinary reads in one account/backend scope.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited