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) -> Result<AuthClient, DelegationError>
pub async fn build(&mut self) -> Result<AuthClient, DelegationError>
Builds a new AuthClient
.