Struct safe_authenticator::Authenticator
[−]
[src]
pub struct Authenticator { pub core_tx: Mutex<CoreMsgTx<()>>, // some fields omitted }
Authenticator instance
Fields
core_tx: Mutex<CoreMsgTx<()>>
Channel to communicate with the core event loop
Methods
impl Authenticator
[src]
fn send<F>(&self, f: F) -> Result<(), AuthError> where
F: FnOnce(&Client<()>) -> Option<Box<Future<Item = (), Error = ()>>> + Send + 'static,
F: FnOnce(&Client<()>) -> Option<Box<Future<Item = (), Error = ()>>> + Send + 'static,
Send a message to the authenticator event loop
fn create_acc<S, NetObs>(
locator: S,
password: S,
invitation: S,
network_observer: NetObs
) -> Result<Self, AuthError> where
NetObs: FnMut(Result<NetworkEvent, ()>) + Send + 'static,
S: Into<String>,
locator: S,
password: S,
invitation: S,
network_observer: NetObs
) -> Result<Self, AuthError> where
NetObs: FnMut(Result<NetworkEvent, ()>) + Send + 'static,
S: Into<String>,
Create a new account
fn login<S, NetObs>(
locator: S,
password: S,
network_observer: NetObs
) -> Result<Self, AuthError> where
S: Into<String>,
NetObs: FnMut(Result<NetworkEvent, ()>) + Send + 'static,
locator: S,
password: S,
network_observer: NetObs
) -> Result<Self, AuthError> where
S: Into<String>,
NetObs: FnMut(Result<NetworkEvent, ()>) + Send + 'static,
Log in to an existing account
fn login_impl<F: Send + 'static, NetObs>(
create_client_fn: F,
network_observer: NetObs
) -> Result<Self, AuthError> where
F: FnOnce(Handle, CoreMsgTx<()>, NetworkTx) -> Result<Client<()>, CoreError>,
NetObs: FnMut(Result<NetworkEvent, ()>) + Send + 'static,
create_client_fn: F,
network_observer: NetObs
) -> Result<Self, AuthError> where
F: FnOnce(Handle, CoreMsgTx<()>, NetworkTx) -> Result<Client<()>, CoreError>,
NetObs: FnMut(Result<NetworkEvent, ()>) + Send + 'static,
Log in to an existing account