pub struct Builder<A: Authenticator> { /* private fields */ }
Expand description
Builder struct to create a new Vaas instance with the expected default values.
// Create a new [Vaas] instance from the builder.
use vaas::Builder;
use vaas::auth::authenticators::ClientCredentials;
let authenticator = ClientCredentials::new("client_id".to_string(), "client_secret".to_string());
let vaas = Builder::new(authenticator).build()?;
Implementations§
source§impl<A: Authenticator> Builder<A>
impl<A: Authenticator> Builder<A>
sourcepub fn keep_alive_delay_ms(self, delay: u64) -> Self
pub fn keep_alive_delay_ms(self, delay: u64) -> Self
Set the delay in which a Ping is sent to the server to keep the connection alive. Defaults to 10s.
sourcepub fn keep_alive(self, keep_alive: bool) -> Self
pub fn keep_alive(self, keep_alive: bool) -> Self
Enable or disable periodic pings to the server to keep the connection alive. Defaults to enabled (true).
sourcepub fn use_cache(self, use_cache: bool) -> Self
pub fn use_cache(self, use_cache: bool) -> Self
Enable or disable the Cache-Lookup on the server
sourcepub fn use_hash_lookup(self, use_hash_lookup: bool) -> Self
pub fn use_hash_lookup(self, use_hash_lookup: bool) -> Self
Enable or disable the Hash-Lookup on the server
sourcepub fn channel_capacity(self, capacity: usize) -> Self
pub fn channel_capacity(self, capacity: usize) -> Self
Set the channel capacity of the internal results channel.
Increase the value if a ResultChannelError("channel lagged by X")
is received.
Defaults to 100.
Auto Trait Implementations§
impl<A> Freeze for Builder<A>where
A: Freeze,
impl<A> RefUnwindSafe for Builder<A>where
A: RefUnwindSafe,
impl<A> Send for Builder<A>where
A: Send,
impl<A> Sync for Builder<A>where
A: Sync,
impl<A> Unpin for Builder<A>where
A: Unpin,
impl<A> UnwindSafe for Builder<A>where
A: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more