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>
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