Enum ControlPacket

Source
#[non_exhaustive]
pub enum ControlPacket<Dst: VoicePacketDst> {
Show 27 variants Version(Box<Version>), UDPTunnel(Box<VoicePacket<Dst>>), Authenticate(Box<Authenticate>), Ping(Box<Ping>), Reject(Box<Reject>), ServerSync(Box<ServerSync>), ChannelRemove(Box<ChannelRemove>), ChannelState(Box<ChannelState>), UserRemove(Box<UserRemove>), UserState(Box<UserState>), BanList(Box<BanList>), TextMessage(Box<TextMessage>), PermissionDenied(Box<PermissionDenied>), ACL(Box<ACL>), QueryUsers(Box<QueryUsers>), CryptSetup(Box<CryptSetup>), ContextActionModify(Box<ContextActionModify>), ContextAction(Box<ContextAction>), UserList(Box<UserList>), VoiceTarget(Box<VoiceTarget>), PermissionQuery(Box<PermissionQuery>), CodecVersion(Box<CodecVersion>), UserStats(Box<UserStats>), RequestBlob(Box<RequestBlob>), ServerConfig(Box<ServerConfig>), SuggestConfig(Box<SuggestConfig>), Other(RawControlPacket),
}
Expand description

A parsed Mumble control packet.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Version(Box<Version>)

§

UDPTunnel(Box<VoicePacket<Dst>>)

§

Authenticate(Box<Authenticate>)

§

Ping(Box<Ping>)

§

Reject(Box<Reject>)

§

ServerSync(Box<ServerSync>)

§

ChannelRemove(Box<ChannelRemove>)

§

ChannelState(Box<ChannelState>)

§

UserRemove(Box<UserRemove>)

§

UserState(Box<UserState>)

§

BanList(Box<BanList>)

§

TextMessage(Box<TextMessage>)

§

PermissionDenied(Box<PermissionDenied>)

§

ACL(Box<ACL>)

§

QueryUsers(Box<QueryUsers>)

§

CryptSetup(Box<CryptSetup>)

§

ContextActionModify(Box<ContextActionModify>)

§

ContextAction(Box<ContextAction>)

§

UserList(Box<UserList>)

§

VoiceTarget(Box<VoiceTarget>)

§

PermissionQuery(Box<PermissionQuery>)

§

CodecVersion(Box<CodecVersion>)

§

UserStats(Box<UserStats>)

§

RequestBlob(Box<RequestBlob>)

§

ServerConfig(Box<ServerConfig>)

§

SuggestConfig(Box<SuggestConfig>)

§

Other(RawControlPacket)

A packet of unknown type.

Implementations§

Source§

impl<Dst: VoicePacketDst> ControlPacket<Dst>

Source

pub fn name(&self) -> &'static str

Returns the internal name of a packet (for debugging purposes).

Trait Implementations§

Source§

impl<Dst: Clone + VoicePacketDst> Clone for ControlPacket<Dst>

Source§

fn clone(&self) -> ControlPacket<Dst>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Dst: Debug + VoicePacketDst> Debug for ControlPacket<Dst>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<EncodeDst: VoicePacketDst, DecodeDst: VoicePacketDst> Encoder<ControlPacket<EncodeDst>> for ControlCodec<EncodeDst, DecodeDst>

Source§

type Error = Error

The type of encoding errors. Read more
Source§

fn encode( &mut self, item: ControlPacket<EncodeDst>, dst: &mut BytesMut, ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
Source§

impl<Dst: VoicePacketDst> From<ACL> for ControlPacket<Dst>

Source§

fn from(inner: ACL) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<Authenticate> for ControlPacket<Dst>

Source§

fn from(inner: Authenticate) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<BanList> for ControlPacket<Dst>

Source§

fn from(inner: BanList) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ChannelRemove> for ControlPacket<Dst>

Source§

fn from(inner: ChannelRemove) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ChannelState> for ControlPacket<Dst>

Source§

fn from(inner: ChannelState) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<CodecVersion> for ControlPacket<Dst>

Source§

fn from(inner: CodecVersion) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ContextAction> for ControlPacket<Dst>

Source§

fn from(inner: ContextAction) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ContextActionModify> for ControlPacket<Dst>

Source§

fn from(inner: ContextActionModify) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ControlPacket<Dst>> for RawControlPacket

Source§

fn from(packet: ControlPacket<Dst>) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<CryptSetup> for ControlPacket<Dst>

Source§

fn from(inner: CryptSetup) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<PermissionDenied> for ControlPacket<Dst>

Source§

fn from(inner: PermissionDenied) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<PermissionQuery> for ControlPacket<Dst>

Source§

fn from(inner: PermissionQuery) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<Ping> for ControlPacket<Dst>

Source§

fn from(inner: Ping) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<QueryUsers> for ControlPacket<Dst>

Source§

fn from(inner: QueryUsers) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<Reject> for ControlPacket<Dst>

Source§

fn from(inner: Reject) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<RequestBlob> for ControlPacket<Dst>

Source§

fn from(inner: RequestBlob) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ServerConfig> for ControlPacket<Dst>

Source§

fn from(inner: ServerConfig) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<ServerSync> for ControlPacket<Dst>

Source§

fn from(inner: ServerSync) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<SuggestConfig> for ControlPacket<Dst>

Source§

fn from(inner: SuggestConfig) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<TextMessage> for ControlPacket<Dst>

Source§

fn from(inner: TextMessage) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<UserList> for ControlPacket<Dst>

Source§

fn from(inner: UserList) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<UserRemove> for ControlPacket<Dst>

Source§

fn from(inner: UserRemove) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<UserState> for ControlPacket<Dst>

Source§

fn from(inner: UserState) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<UserStats> for ControlPacket<Dst>

Source§

fn from(inner: UserStats) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<Version> for ControlPacket<Dst>

Source§

fn from(inner: Version) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<VoicePacket<Dst>> for ControlPacket<Dst>

Source§

fn from(inner: VoicePacket<Dst>) -> Self

Converts to this type from the input type.
Source§

impl<Dst: VoicePacketDst> From<VoiceTarget> for ControlPacket<Dst>

Source§

fn from(inner: VoiceTarget) -> Self

Converts to this type from the input type.
Source§

impl<Dst: PartialEq + VoicePacketDst> PartialEq for ControlPacket<Dst>

Source§

fn eq(&self, other: &ControlPacket<Dst>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Dst: VoicePacketDst> TryFrom<RawControlPacket> for ControlPacket<Dst>

Source§

type Error = ProtobufError

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

fn try_from(packet: RawControlPacket) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl<Dst: VoicePacketDst> StructuralPartialEq for ControlPacket<Dst>

Auto Trait Implementations§

§

impl<Dst> !Freeze for ControlPacket<Dst>

§

impl<Dst> RefUnwindSafe for ControlPacket<Dst>

§

impl<Dst> Send for ControlPacket<Dst>
where <Dst as VoicePacketDst>::SessionId: Send, Dst: Send,

§

impl<Dst> Sync for ControlPacket<Dst>
where <Dst as VoicePacketDst>::SessionId: Sync, Dst: Sync,

§

impl<Dst> Unpin for ControlPacket<Dst>

§

impl<Dst> UnwindSafe for ControlPacket<Dst>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.