pub struct AuthProtocol { /* private fields */ }
Expand description
Authentication protocol handler for integration with QuicP2PNode
Implementations§
Source§impl AuthProtocol
impl AuthProtocol
Sourcepub fn new(auth_manager: Arc<AuthManager>) -> Self
pub fn new(auth_manager: Arc<AuthManager>) -> Self
Create a new authentication protocol handler
Sourcepub async fn handle_message(
&self,
peer_id: PeerId,
message: AuthMessage,
) -> Result<Option<AuthMessage>, AuthError>
pub async fn handle_message( &self, peer_id: PeerId, message: AuthMessage, ) -> Result<Option<AuthMessage>, AuthError>
Handle incoming authentication message
Sourcepub async fn initiate_auth(&self) -> AuthMessage
pub async fn initiate_auth(&self) -> AuthMessage
Initiate authentication with a peer
Auto Trait Implementations§
impl Freeze for AuthProtocol
impl !RefUnwindSafe for AuthProtocol
impl Send for AuthProtocol
impl Sync for AuthProtocol
impl Unpin for AuthProtocol
impl !UnwindSafe for AuthProtocol
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more