Skip to main content

TokensReceiver

Trait TokensReceiver 

Source
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§

Source

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=].

Source

fn put_token( &self, owner: PartyRef, token: Token, context: RequestContext, ) -> impl Future<Output = Handled<Created>> + Send

PUT {tokens}/{cc}/{party}/{token_uid}[?type=].

Source

fn patch_token( &self, owner: PartyRef, token_uid: String, token_type: Option<TokenType>, patch: Patch<Token>, context: RequestContext, ) -> impl Future<Output = Handled<()>> + Send

PATCH {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§

Source§

impl TokensReceiver for MockPeer

Available on crate feature testkit only.