pub struct AlnpSession {
pub role: AlnpRole,
/* private fields */
}Fields§
§role: AlnpRoleImplementations§
Source§impl AlnpSession
impl AlnpSession
pub fn new(role: AlnpRole) -> Self
pub fn established(&self) -> Option<SessionEstablished>
pub fn keys(&self) -> Option<SessionKeys>
pub fn state(&self) -> SessionState
pub fn ensure_streaming_ready( &self, ) -> Result<SessionEstablished, HandshakeError>
pub fn update_keepalive(&self)
pub fn check_timeouts(&self) -> Result<(), HandshakeError>
Sourcepub fn set_stream_profile(
&self,
profile: CompiledStreamProfile,
) -> Result<(), HandshakeError>
pub fn set_stream_profile( &self, profile: CompiledStreamProfile, ) -> Result<(), HandshakeError>
Sets the stream profile that determines runtime behavior.
This method locks the profile until streaming begins to enforce immutability.
Sourcepub fn profile_config_id(&self) -> Option<String>
pub fn profile_config_id(&self) -> Option<String>
Returns the bound profile’s config ID, if set.
The config_id is computed from the normalized profile and never changes.
Sourcepub fn compiled_profile(&self) -> Option<CompiledStreamProfile>
pub fn compiled_profile(&self) -> Option<CompiledStreamProfile>
Retrieves the compiled profile, if configured.
Once streaming starts this returns the same object that controls runtime behavior.
pub fn set_jitter_strategy(&self, strat: JitterStrategy)
pub fn jitter_strategy(&self) -> JitterStrategy
pub fn close(&self)
pub fn fail(&self, reason: String)
pub fn set_streaming_enabled(&self, enabled: bool)
pub fn mark_streaming(&self)
pub fn streaming_enabled(&self) -> bool
pub async fn connect<T, A, K>(
identity: DeviceIdentity,
capabilities: CapabilitySet,
authenticator: A,
key_exchange: K,
context: HandshakeContext,
transport: &mut T,
) -> Result<Self, HandshakeError>where
T: HandshakeTransport + Send,
A: ChallengeAuthenticator + Send + Sync,
K: KeyExchange + Send + Sync,
pub async fn accept<T, A, K>(
identity: DeviceIdentity,
capabilities: CapabilitySet,
authenticator: A,
key_exchange: K,
context: HandshakeContext,
transport: &mut T,
) -> Result<Self, HandshakeError>where
T: HandshakeTransport + Send,
A: ChallengeAuthenticator + Send + Sync,
K: KeyExchange + Send + Sync,
Trait Implementations§
Source§impl Clone for AlnpSession
impl Clone for AlnpSession
Source§fn clone(&self) -> AlnpSession
fn clone(&self) -> AlnpSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AlnpSession
impl RefUnwindSafe for AlnpSession
impl Send for AlnpSession
impl Sync for AlnpSession
impl Unpin for AlnpSession
impl UnwindSafe for AlnpSession
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