pub enum ModePair<A, B> {
Mode0(A),
Mode1(B),
}Expand description
A helper struct for protocol fields that start with a “Mode” byte.
In 1.21, several components (like Jukebox Songs or Trim Materials) are encoded as:
- Byte
0: Followed by Type A (usually a String Identifier). - Byte
1: Followed by Type B (usually an ID or Inline Definition).
Variants§
Mode0(A)
Mode 0: Usually references a registry key by name.
Mode1(B)
Mode 1: Usually references a registry ID or defines the data inline.
Trait Implementations§
impl<A, B> StructuralPartialEq for ModePair<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for ModePair<A, B>
impl<A, B> RefUnwindSafe for ModePair<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for ModePair<A, B>
impl<A, B> Sync for ModePair<A, B>
impl<A, B> Unpin for ModePair<A, B>
impl<A, B> UnwindSafe for ModePair<A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more