Trait zenoh_protocol::session::authenticator::PeerAuthenticatorTrait[][src]

pub trait PeerAuthenticatorTrait {
#[must_use]    fn get_init_syn_properties<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        link: &'life1 AuthenticatedPeerLink,
        peer_id: &'life2 PeerId
    ) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn handle_init_syn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        link: &'life1 AuthenticatedPeerLink,
        peer_id: &'life2 PeerId,
        sn_resolution: ZInt,
        properties: &'life3 [Property]
    ) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn handle_init_ack<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        link: &'life1 AuthenticatedPeerLink,
        peer_id: &'life2 PeerId,
        sn_resolution: ZInt,
        properties: &'life3 [Property]
    ) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        'life3: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn handle_open_syn<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        link: &'life1 AuthenticatedPeerLink,
        properties: &'life2 [Property]
    ) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn handle_open_ack<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        link: &'life1 AuthenticatedPeerLink,
        properties: &'life2 [Property]
    ) -> Pin<Box<dyn Future<Output = ZResult<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn handle_link_err<'life0, 'life1, 'async_trait>(
        &'life0 self,
        link: &'life1 AuthenticatedPeerLink
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn handle_close<'life0, 'life1, 'async_trait>(
        &'life0 self,
        peer_id: &'life1 PeerId
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }

Required methods

#[must_use]fn get_init_syn_properties<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    link: &'life1 AuthenticatedPeerLink,
    peer_id: &'life2 PeerId
) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Return the attachment to be included in the InitSyn message.

Arguments

  • link - The AuthenticatedPeerLink the initial InitSyn message will be sent on

  • peer_id - The PeerId of the sender of the InitSyn, i.e., the peer initiating a new session.

#[must_use]fn handle_init_syn<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    link: &'life1 AuthenticatedPeerLink,
    peer_id: &'life2 PeerId,
    sn_resolution: ZInt,
    properties: &'life3 [Property]
) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Return the attachment to be included in the InitAck message to be sent in response of the authenticated InitSyn.

Arguments

  • link - The AuthenticatedPeerLink the InitSyn message was received on

  • peer_id - The PeerId of the sender of the InitSyn message

  • attachment - The optional [Attachment][Attachment] included in the InitSyn message

#[must_use]fn handle_init_ack<'life0, 'life1, 'life2, 'life3, 'async_trait>(
    &'life0 self,
    link: &'life1 AuthenticatedPeerLink,
    peer_id: &'life2 PeerId,
    sn_resolution: ZInt,
    properties: &'life3 [Property]
) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    'life3: 'async_trait,
    Self: 'async_trait, 
[src]

Return the attachment to be included in the OpenSyn message to be sent in response of the authenticated InitAck.

Arguments

  • link - The AuthenticatedPeerLink the InitSyn message was received on

  • peer_id - The PeerId of the sender of the InitAck message

  • attachment - The optional [Attachment][Attachment] included in the InitAck message

#[must_use]fn handle_open_syn<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    link: &'life1 AuthenticatedPeerLink,
    properties: &'life2 [Property]
) -> Pin<Box<dyn Future<Output = ZResult<Vec<Property>>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Return the attachment to be included in the OpenAck message to be sent in response of the authenticated OpenSyn.

Arguments

  • link - The AuthenticatedPeerLink the OpenSyn message was received on

  • peer_id - The PeerId of the sender of the OpenSyn message

  • attachment - The optional [Attachment][Attachment] included in the OpenSyn message

#[must_use]fn handle_open_ack<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    link: &'life1 AuthenticatedPeerLink,
    properties: &'life2 [Property]
) -> Pin<Box<dyn Future<Output = ZResult<()>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Auhtenticate the OpenAck. No message is sent back in response to an OpenAck

Arguments

  • link - The AuthenticatedPeerLink the OpenAck message was received on

  • peer_id - The PeerId of the sender of the OpenAck message

  • attachment - The optional [Attachment][Attachment] included in the OpenAck message

Handle any error on a link. This callback is mainly used to clean-up any internal state of the authenticator in such a way no unnecessary data is left around

Arguments

#[must_use]fn handle_close<'life0, 'life1, 'async_trait>(
    &'life0 self,
    peer_id: &'life1 PeerId
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Handle any error on a link. This callback is mainly used to clean-up any internal state of the authenticator in such a way no unnecessary data is left around

Arguments

  • peerd_id - The PeerId of the session being closed.
Loading content...

Implementors

impl PeerAuthenticatorTrait for DummyPeerAuthenticator[src]

impl PeerAuthenticatorTrait for UserPasswordAuthenticator[src]

Loading content...