Struct ic_auth_client::AuthClientBuilder
source · pub struct AuthClientBuilder { /* private fields */ }Expand description
Builder for the AuthClient.
Implementations§
source§impl AuthClientBuilder
impl AuthClientBuilder
sourcepub fn identity(&mut self, identity: IdentityType) -> &mut Self
pub fn identity(&mut self, identity: IdentityType) -> &mut Self
An optional identity to use as the base. If not provided, an Ed25519 key pair will be used.
sourcepub fn storage(&mut self, storage: AuthClientStorageType) -> &mut Self
pub fn storage(&mut self, storage: AuthClientStorageType) -> &mut Self
Optional storage with get, set, and remove methods. Currentry only LocalStorage is supported.
sourcepub fn key_type(&mut self, key_type: BaseKeyType) -> &mut Self
pub fn key_type(&mut self, key_type: BaseKeyType) -> &mut Self
The type of key to use for the base key. If not provided, Ed25519 will be used by default.
sourcepub fn idle_options(&mut self, idle_options: IdleOptions) -> &mut Self
pub fn idle_options(&mut self, idle_options: IdleOptions) -> &mut Self
Options for handling idle timeouts. If not provided, default options will be used.
sourcepub fn disable_idle(&mut self, disable_idle: bool) -> &mut Self
pub fn disable_idle(&mut self, disable_idle: bool) -> &mut Self
If set to true, disables the idle timeout functionality.
sourcepub fn disable_default_idle_callback(
&mut self,
disable_default_idle_callback: bool,
) -> &mut Self
pub fn disable_default_idle_callback( &mut self, disable_default_idle_callback: bool, ) -> &mut Self
If set to true, disables the default idle timeout callback.
sourcepub fn idle_manager_options(
&mut self,
idle_manager_options: IdleManagerOptions,
) -> &mut Self
pub fn idle_manager_options( &mut self, idle_manager_options: IdleManagerOptions, ) -> &mut Self
Options for the IdleManager that handles idle timeouts.
sourcepub fn on_idle(&mut self, on_idle: fn()) -> &mut Self
pub fn on_idle(&mut self, on_idle: fn()) -> &mut Self
A callback function to be executed when the system becomes idle.
sourcepub fn idle_timeout(&mut self, idle_timeout: u32) -> &mut Self
pub fn idle_timeout(&mut self, idle_timeout: u32) -> &mut Self
The duration of inactivity after which the system is considered idle.
sourcepub fn scroll_debounce(&mut self, scroll_debounce: u32) -> &mut Self
pub fn scroll_debounce(&mut self, scroll_debounce: u32) -> &mut Self
A delay for debouncing scroll events.
sourcepub fn capture_scroll(&mut self, capture_scroll: bool) -> &mut Self
pub fn capture_scroll(&mut self, capture_scroll: bool) -> &mut Self
A flag indicating whether to capture scroll events.
sourcepub async fn build(&mut self) -> AuthClient
pub async fn build(&mut self) -> AuthClient
Builds a new AuthClient.