pub struct OptionalRegistry<T: Registry>(pub Option<T>);
Expand description
A registry that might not be present. This is transmitted as a single varint in the protocol.
Tuple Fields§
§0: Option<T>
Trait Implementations§
Source§impl<T: Registry> AzaleaRead for OptionalRegistry<T>
impl<T: Registry> AzaleaRead for OptionalRegistry<T>
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>
Source§impl<T: Registry> AzaleaWrite for OptionalRegistry<T>
impl<T: Registry> AzaleaWrite for OptionalRegistry<T>
Source§impl<T: Clone + Registry> Clone for OptionalRegistry<T>
impl<T: Clone + Registry> Clone for OptionalRegistry<T>
Source§fn clone(&self) -> OptionalRegistry<T>
fn clone(&self) -> OptionalRegistry<T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl<T: Copy + Registry> Copy for OptionalRegistry<T>
impl<T: Eq + Registry> Eq for OptionalRegistry<T>
impl<T: Registry> StructuralPartialEq for OptionalRegistry<T>
Auto Trait Implementations§
impl<T> Freeze for OptionalRegistry<T>where
T: Freeze,
impl<T> RefUnwindSafe for OptionalRegistry<T>where
T: RefUnwindSafe,
impl<T> Send for OptionalRegistry<T>where
T: Send,
impl<T> Sync for OptionalRegistry<T>where
T: Sync,
impl<T> Unpin for OptionalRegistry<T>where
T: Unpin,
impl<T> UnwindSafe for OptionalRegistry<T>where
T: 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