Skip to main content

Session

Struct Session 

Source
pub(crate) struct Session {
Show 16 fields pub(crate) id: u64, pub(crate) silo_id: u32, pub(crate) token: u64, pub(crate) flags: u64, pub(crate) expires_at_ns: u64, pub(crate) offer_len: u16, pub(crate) answer_len: u16, pub(crate) offer: [u8; 256], pub(crate) answer: [u8; 256], pub(crate) candidates: VecDeque<Candidate>, pub(crate) last_input: [u8; 24], pub(crate) last_input_len: u8, pub(crate) last_frame_seq: u64, pub(crate) udp_rx_fd: Option<usize>, pub(crate) udp_tx_fd: Option<usize>, pub(crate) udp_local_port: u16,
}

Fields§

§id: u64§silo_id: u32§token: u64§flags: u64§expires_at_ns: u64§offer_len: u16§answer_len: u16§offer: [u8; 256]§answer: [u8; 256]§candidates: VecDeque<Candidate>§last_input: [u8; 24]§last_input_len: u8§last_frame_seq: u64§udp_rx_fd: Option<usize>§udp_tx_fd: Option<usize>§udp_local_port: u16

Implementations§

Source§

impl Session

Source

pub(crate) fn new( id: u64, silo_id: u32, token: u64, flags: u64, ttl_sec: u32, now_ns: u64, udp_local_port: u16, udp_rx_fd: Option<usize>, ) -> Self

Source

pub(crate) fn is_expired(&self, now_ns: u64) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.