Struct ChannelFlags

Source
pub struct ChannelFlags { /* private fields */ }
Available on crate feature vanilla and (crate features shared or vanilla or tbc or wrath) only.
Expand description

Auto generated from the original wowm in file wow_message_parser/wowm/world/chat/smsg_channel_list.wowm:3:

flag ChannelFlags : u8 {
    NONE = 0x00;
    CUSTOM = 0x01;
    TRADE = 0x04;
    NOT_LFG = 0x08;
    GENERAL = 0x10;
    CITY = 0x20;
    LFG = 0x40;
    VOICE = 0x80;
}

Implementations§

Source§

impl ChannelFlags

Source

pub fn as_test_case_value(&self) -> String

Available on crate feature print-testcase only.
Source§

impl ChannelFlags

Source

pub const NONE: u8 = 0u8

Source

pub const CUSTOM: u8 = 1u8

Source

pub const TRADE: u8 = 4u8

Source

pub const NOT_LFG: u8 = 8u8

Source

pub const GENERAL: u8 = 16u8

Source

pub const CITY: u8 = 32u8

Source

pub const LFG: u8 = 64u8

Source

pub const VOICE: u8 = 128u8

Source

pub const fn new(inner: u8) -> Self

Source

pub const fn empty() -> Self

Source

pub const fn is_empty(&self) -> bool

Source

pub const fn all() -> Self

Source

pub const fn is_custom(&self) -> bool

Source

pub const fn new_custom() -> Self

Source

pub fn set_custom(&mut self) -> Self

Source

pub fn clear_custom(&mut self) -> Self

Source

pub const fn is_trade(&self) -> bool

Source

pub const fn new_trade() -> Self

Source

pub fn set_trade(&mut self) -> Self

Source

pub fn clear_trade(&mut self) -> Self

Source

pub const fn is_not_lfg(&self) -> bool

Source

pub const fn new_not_lfg() -> Self

Source

pub fn set_not_lfg(&mut self) -> Self

Source

pub fn clear_not_lfg(&mut self) -> Self

Source

pub const fn is_general(&self) -> bool

Source

pub const fn new_general() -> Self

Source

pub fn set_general(&mut self) -> Self

Source

pub fn clear_general(&mut self) -> Self

Source

pub const fn is_city(&self) -> bool

Source

pub const fn new_city() -> Self

Source

pub fn set_city(&mut self) -> Self

Source

pub fn clear_city(&mut self) -> Self

Source

pub const fn is_lfg(&self) -> bool

Source

pub const fn new_lfg() -> Self

Source

pub fn set_lfg(&mut self) -> Self

Source

pub fn clear_lfg(&mut self) -> Self

Source

pub const fn is_voice(&self) -> bool

Source

pub const fn new_voice() -> Self

Source

pub fn set_voice(&mut self) -> Self

Source

pub fn clear_voice(&mut self) -> Self

Source

pub const fn as_int(&self) -> u8

Trait Implementations§

Source§

impl Binary for ChannelFlags

Source§

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

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

impl BitAnd for ChannelFlags

Source§

type Output = ChannelFlags

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for ChannelFlags

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl BitOr for ChannelFlags

Source§

type Output = ChannelFlags

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for ChannelFlags

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl BitXor for ChannelFlags

Source§

type Output = ChannelFlags

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for ChannelFlags

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl Clone for ChannelFlags

Source§

fn clone(&self) -> ChannelFlags

Returns a duplicate 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 Debug for ChannelFlags

Source§

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

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

impl Default for ChannelFlags

Source§

fn default() -> ChannelFlags

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for ChannelFlags

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl From<i8> for ChannelFlags

Source§

fn from(value: i8) -> Self

Converts to this type from the input type.
Source§

impl From<u8> for ChannelFlags

Source§

fn from(value: u8) -> Self

Converts to this type from the input type.
Source§

impl Hash for ChannelFlags

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl LowerHex for ChannelFlags

Source§

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

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

impl Octal for ChannelFlags

Source§

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

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

impl Ord for ChannelFlags

Source§

fn cmp(&self, other: &ChannelFlags) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for ChannelFlags

Source§

fn eq(&self, other: &ChannelFlags) -> 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 PartialOrd for ChannelFlags

Source§

fn partial_cmp(&self, other: &ChannelFlags) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Serialize for ChannelFlags

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<i16> for ChannelFlags

Source§

type Error = i16

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

fn try_from(value: i16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i32> for ChannelFlags

Source§

type Error = i32

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

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<i64> for ChannelFlags

Source§

type Error = i64

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

fn try_from(value: i64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u16> for ChannelFlags

Source§

type Error = u16

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

fn try_from(value: u16) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u32> for ChannelFlags

Source§

type Error = u32

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

fn try_from(value: u32) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<u64> for ChannelFlags

Source§

type Error = u64

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

fn try_from(value: u64) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<usize> for ChannelFlags

Source§

type Error = usize

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

fn try_from(value: usize) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl UpperHex for ChannelFlags

Source§

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

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

impl Copy for ChannelFlags

Source§

impl Eq for ChannelFlags

Source§

impl StructuralPartialEq for ChannelFlags

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> 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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,