Skip to main content

PacketVtblRef

Union PacketVtblRef 

Source
pub union PacketVtblRef<Perms: PacketPerms> {
    pub tag: usize,
    pub vtbl: &'static Perms,
}
Expand description

Describes packet type.

If the value within this union is less than PacketVtblTag::Complex, then the packet is simple, and tag should be accessed. Meanwhile, any other value implies the packet is a complex one, and vtable should be accessed instead.

Fields§

§tag: usize§vtbl: &'static Perms

Implementations§

Source§

impl<Perms: PacketPerms> PacketVtblRef<Perms>

Source

pub fn tag(&self) -> PacketVtblTag

Source

pub fn vtbl(&self) -> Option<&'static Perms>

Trait Implementations§

Source§

impl<Perms: Copy + Clone + PacketPerms> Clone for PacketVtblRef<Perms>

Source§

fn clone(&self) -> PacketVtblRef<Perms>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<Perms: Copy + PacketPerms> Copy for PacketVtblRef<Perms>

Source§

impl<Perms: PacketPerms> Debug for PacketVtblRef<Perms>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<Perms> Freeze for PacketVtblRef<Perms>

§

impl<Perms> RefUnwindSafe for PacketVtblRef<Perms>
where Perms: RefUnwindSafe,

§

impl<Perms> Send for PacketVtblRef<Perms>
where Perms: Sync,

§

impl<Perms> Sync for PacketVtblRef<Perms>
where Perms: Sync,

§

impl<Perms> Unpin for PacketVtblRef<Perms>

§

impl<Perms> UnsafeUnpin for PacketVtblRef<Perms>

§

impl<Perms> UnwindSafe for PacketVtblRef<Perms>
where Perms: RefUnwindSafe,

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> ContextBounds for T
where T: 'static + Clone + Send + Sync,

Source§

impl<T, F> From2<T> for F
where T: Into<F>,

Source§

fn from2(other: T) -> F

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> GenericTypeBounds for T

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.