pub struct AccountListenerSynchronousProxy { /* private fields */ }
Implementations§
source§impl AccountListenerSynchronousProxy
impl AccountListenerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: Time
) -> Result<AccountListenerEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> Result<AccountListenerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
sourcepub fn on_initialize(
&self,
account_states: &mut dyn ExactSizeIterator<Item = &mut AccountAuthState>,
___deadline: Time
) -> Result<(), Error>
pub fn on_initialize( &self, account_states: &mut dyn ExactSizeIterator<Item = &mut AccountAuthState>, ___deadline: Time ) -> Result<(), Error>
A method that is called to communicate the initial set of accounts and their authentication states. OnInitialize is called exactly once if and only if AccountListenerOptions.initial_state was set when creating the AccountListener. When called, it will always be the first call on the channel. If no accounts are present on the device the vector will be empty.
account_states
The set of initial states.
sourcepub fn on_account_added(
&self,
account_state: &mut AccountAuthState,
___deadline: Time
) -> Result<(), Error>
pub fn on_account_added( &self, account_state: &mut AccountAuthState, ___deadline: Time ) -> Result<(), Error>
A method that is called when a new account is added to the device. This method is only called if AccountListenerOptions.add_account was set when creating the AccountListener.
account_state
The initial state for the newly added account.
sourcepub fn on_account_removed(
&self,
account_id: u64,
___deadline: Time
) -> Result<(), Error>
pub fn on_account_removed( &self, account_id: u64, ___deadline: Time ) -> Result<(), Error>
A method that is called when a provisioned account is removed. This method is only called if AccountListenerOptions.remove_account was set when creating the AccountListener.
sourcepub fn on_auth_state_changed(
&self,
account_auth_state: &mut AccountAuthState,
___deadline: Time
) -> Result<(), Error>
pub fn on_auth_state_changed( &self, account_auth_state: &mut AccountAuthState, ___deadline: Time ) -> Result<(), Error>
A method that is called when the authentication state of any provisioned account changes.