Skip to main content

create

Function create 

Source
pub fn create<A, C, J>(
    this: &impl Actor<A = A>,
    creator: C,
    creator_joined: PortRef<Joined<J>>,
    options: Options,
) -> Result<Token<C, J>>
where A: Actor, C: TokenPeer + Clone, J: TokenPeer,
Expand description

Create a rendezvous token owned by this.

The token is backed by a child actor, so it is supervised by the creator. The creator receives Joined notifications on creator_joined; joiners receive JoinResult on the result port they pass to Token::join.