pub trait TokensReceiver:
Send
+ Sync
+ 'static {
// Required methods
fn token(
&self,
owner: PartyRef,
token_uid: String,
token_type: Option<TokenType>,
context: RequestContext,
) -> impl Future<Output = Handled<Token>> + Send;
fn put_token(
&self,
owner: PartyRef,
token: Token,
context: RequestContext,
) -> impl Future<Output = Handled<Created>> + Send;
fn patch_token(
&self,
owner: PartyRef,
token_uid: String,
token_type: Option<TokenType>,
patch: Patch<Token>,
context: RequestContext,
) -> impl Future<Output = Handled<()>> + Send;
}Available on crate feature
server only.Expand description
The CPO side of the Tokens module: receiving the Tokens an eMSP owns.
Spec: 2.3.0 §mod_tokens_cpo_interface
Required Methods§
Sourcefn token(
&self,
owner: PartyRef,
token_uid: String,
token_type: Option<TokenType>,
context: RequestContext,
) -> impl Future<Output = Handled<Token>> + Send
fn token( &self, owner: PartyRef, token_uid: String, token_type: Option<TokenType>, context: RequestContext, ) -> impl Future<Output = Handled<Token>> + Send
GET {tokens}/{cc}/{party}/{token_uid}[?type=].
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl TokensReceiver for MockPeer
Available on crate feature
testkit only.