pub struct SessionState<'a> { /* private fields */ }Implementations§
Source§impl<'a> SessionState<'a>
impl<'a> SessionState<'a>
pub async fn new( gateway: &'a VoiceGateway, tx: UnboundedSender<Message>, seq_ack: Arc<AtomicI64>, conn_token: CancellationToken, persistent_state: Arc<Mutex<PersistentSessionState>>, backoff: &'a mut Backoff, ) -> Result<Self, GatewayError>
pub fn set_speaking_tx(&mut self, tx: UnboundedSender<bool>)
pub fn ssrc(&self) -> u32
pub fn tx(&self) -> &UnboundedSender<Message>
pub fn attempt(&self) -> u32
pub fn has_heartbeat(&self) -> bool
pub async fn handle_text(&mut self, text: String) -> Option<SessionOutcome>
pub async fn handle_binary(&mut self, bin: Vec<u8>)
Trait Implementations§
Source§impl<'a> Drop for SessionState<'a>
impl<'a> Drop for SessionState<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SessionState<'a>
impl<'a> !UnwindSafe for SessionState<'a>
impl<'a> Freeze for SessionState<'a>
impl<'a> Send for SessionState<'a>
impl<'a> Sync for SessionState<'a>
impl<'a> Unpin for SessionState<'a>
impl<'a> UnsafeUnpin for SessionState<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more