pub struct AuthRequest {
pub apikey: Option<String>,
pub token: Option<String>,
pub sdk_token: Option<String>,
pub heartbeat_interval_ms: Option<u64>,
}Expand description
WebSocket authentication request
Fields§
§apikey: Option<String>API key (if using API key auth)
token: Option<String>Bearer token (if using token auth)
sdk_token: Option<String>SDK token (if using SDK token auth)
heartbeat_interval_ms: Option<u64>Optional client-requested heartbeat interval in milliseconds. Server may honor or clamp; absent value means “use server default”.
Wire-only field in 3.x — there is no public builder method
yet because the server side does not honor this preference. Once
server support lands (Phase 2.3 in the SDK roadmap), a
with_heartbeat_interval builder will be exposed.
Pre-shipping the wire field here means deployed v3.x clients
can negotiate without needing a fresh release.
Implementations§
Source§impl AuthRequest
impl AuthRequest
Sourcepub fn with_api_key(api_key: impl Into<String>) -> AuthRequest
pub fn with_api_key(api_key: impl Into<String>) -> AuthRequest
Create API key auth request
Sourcepub fn with_token(token: impl Into<String>) -> AuthRequest
pub fn with_token(token: impl Into<String>) -> AuthRequest
Create bearer token auth request
Sourcepub fn with_sdk_token(sdk_token: impl Into<String>) -> AuthRequest
pub fn with_sdk_token(sdk_token: impl Into<String>) -> AuthRequest
Create SDK token auth request
Trait Implementations§
Source§impl Clone for AuthRequest
impl Clone for AuthRequest
Source§fn clone(&self) -> AuthRequest
fn clone(&self) -> AuthRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AuthRequest
impl Debug for AuthRequest
Source§impl<'de> Deserialize<'de> for AuthRequest
impl<'de> Deserialize<'de> for AuthRequest
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AuthRequest, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for AuthRequest
impl Serialize for AuthRequest
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for AuthRequest
impl RefUnwindSafe for AuthRequest
impl Send for AuthRequest
impl Sync for AuthRequest
impl Unpin for AuthRequest
impl UnsafeUnpin for AuthRequest
impl UnwindSafe for AuthRequest
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