Skip to main content

AnyConnection

Enum AnyConnection 

Source
pub enum AnyConnection {
    Draft07(Connection),
    Draft08(Connection),
    Draft09(Connection),
    Draft10(Connection),
    Draft11(Connection),
    Draft12(Connection),
    Draft13(Connection),
    Draft14(Connection),
    Draft15(Connection),
    Draft16(Connection),
    Draft17(Connection),
}
Expand description

A MoQT client connection of any enabled draft version.

Wraps the draft-specific Connection type. Methods common to all drafts are forwarded; for draft-specific protocol calls, match on the variant.

Variants§

§

Draft07(Connection)

A draft-draft07 connection.

§

Draft08(Connection)

A draft-draft08 connection.

§

Draft09(Connection)

A draft-draft09 connection.

§

Draft10(Connection)

A draft-draft10 connection.

§

Draft11(Connection)

A draft-draft11 connection.

§

Draft12(Connection)

A draft-draft12 connection.

§

Draft13(Connection)

A draft-draft13 connection.

§

Draft14(Connection)

A draft-draft14 connection.

§

Draft15(Connection)

A draft-draft15 connection.

§

Draft16(Connection)

A draft-draft16 connection.

§

Draft17(Connection)

A draft-draft17 connection.

Implementations§

Source§

impl AnyConnection

Source

pub fn draft(&self) -> DraftVersion

Returns the draft version this connection is using.

Source

pub fn set_observer(&mut self, observer: Arc<dyn AnyConnectionObserver>)

Attach an observer. The observer is adapted into the draft-specific observer trait and installed on the inner connection; events are forwarded as AnyClientEvent.

Replaces any previously attached observer.

Source

pub fn clear_observer(&mut self)

Remove any attached observer.

Source

pub fn close(&self, code: u32, reason: &[u8])

Close the connection with the given application error code and reason.

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more