Skip to main content

TypedJoinContext

Struct TypedJoinContext 

Source
pub struct TypedJoinContext<'a, S>
where S: PondSchema,
{ /* private fields */ }

Implementations§

Source§

impl<'a, S> TypedJoinContext<'a, S>
where S: PondSchema,

Source

pub fn new(raw: &'a mut JoinContext) -> Self

Source

pub fn raw(&mut self) -> &mut JoinContext

Source

pub fn user_id(&self) -> &str

Source

pub fn channel(&self) -> TypedChannel<S>

Source

pub fn join_params(&self) -> Result<S::JoinParams>

Source

pub async fn accept(&mut self, assigns: &S::Assigns) -> Result<&mut Self>

Source

pub async fn decline( &mut self, code: u16, message: impl Into<String>, ) -> Result<()>

Source

pub async fn reply<E>(&self, payload: &E::Response) -> Result<()>
where E: PondEvent,

Source

pub async fn track(&self, presence: &S::Presence) -> Result<()>

Source

pub async fn broadcast<E>(&self, payload: &E::Payload) -> Result<()>
where E: PondEvent,

Auto Trait Implementations§

§

impl<'a, S> !RefUnwindSafe for TypedJoinContext<'a, S>

§

impl<'a, S> !UnwindSafe for TypedJoinContext<'a, S>

§

impl<'a, S> Freeze for TypedJoinContext<'a, S>
where PhantomData<S>: Freeze,

§

impl<'a, S> Send for TypedJoinContext<'a, S>
where PhantomData<S>: Send,

§

impl<'a, S> Sync for TypedJoinContext<'a, S>
where PhantomData<S>: Sync,

§

impl<'a, S> Unpin for TypedJoinContext<'a, S>
where PhantomData<S>: Unpin,

§

impl<'a, S> UnsafeUnpin for TypedJoinContext<'a, S>

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

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

fn try_from(value: U) -> Result<T, !>

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.