[][src]Trait splinter::network::auth::AuthorizationCallback

pub trait AuthorizationCallback: Send {
    fn on_authorization_change(
        &self,
        peer_id: &str,
        state: PeerAuthorizationState
    ) -> Result<(), AuthorizationCallbackError>; }

A callback for changes in a peer's authorization state.

Required methods

fn on_authorization_change(
    &self,
    peer_id: &str,
    state: PeerAuthorizationState
) -> Result<(), AuthorizationCallbackError>

This function is called when a peer's state changes to Authorized or Unauthorized.

Loading content...

Implementors

impl<F> AuthorizationCallback for F where
    F: Fn(&str, PeerAuthorizationState) -> Result<(), AuthorizationCallbackError> + Send
[src]

Loading content...