Struct msgpacker::types::MapEntryRef
source · [−]pub struct MapEntryRef<'a> { /* private fields */ }
Expand description
Maps key: message to value: message with lifetime bound to MessageRef
Implementations
sourceimpl<'a> MapEntryRef<'a>
impl<'a> MapEntryRef<'a>
sourcepub const fn new(key: MessageRef<'a>, val: MessageRef<'a>) -> Self
pub const fn new(key: MessageRef<'a>, val: MessageRef<'a>) -> Self
Instantiate a new key -> value entry
sourcepub const fn key(&self) -> &MessageRef<'a>
pub const fn key(&self) -> &MessageRef<'a>
Underlying key
sourcepub const fn val(&self) -> &MessageRef<'a>
pub const fn val(&self) -> &MessageRef<'a>
Underlying value
sourcepub const fn inner(&self) -> (&MessageRef<'a>, &MessageRef<'a>)
pub const fn inner(&self) -> (&MessageRef<'a>, &MessageRef<'a>)
Access the internal key and value as a tuple of references
sourcepub unsafe fn into_owned(self) -> MapEntry
pub unsafe fn into_owned(self) -> MapEntry
Safety
The unsafety of this function reflects crate::types::ExtensionRef::into_owned
.
If its safety criteria is met, then this function is safe.
Trait Implementations
sourceimpl<'a> Clone for MapEntryRef<'a>
impl<'a> Clone for MapEntryRef<'a>
sourcefn clone(&self) -> MapEntryRef<'a>
fn clone(&self) -> MapEntryRef<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for MapEntryRef<'a>
impl<'a> Debug for MapEntryRef<'a>
sourceimpl<'a> From<MapEntryRef<'a>> for MessageRef<'a>
impl<'a> From<MapEntryRef<'a>> for MessageRef<'a>
sourcefn from(m: MapEntryRef<'a>) -> Self
fn from(m: MapEntryRef<'a>) -> Self
Converts to this type from the input type.
sourceimpl<'a> FromIterator<MapEntryRef<'a>> for MessageRef<'a>
impl<'a> FromIterator<MapEntryRef<'a>> for MessageRef<'a>
sourcefn from_iter<I: IntoIterator<Item = MapEntryRef<'a>>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = MapEntryRef<'a>>>(iter: I) -> Self
Creates a value from an iterator. Read more
sourceimpl<'a> PartialEq<MapEntryRef<'a>> for MapEntryRef<'a>
impl<'a> PartialEq<MapEntryRef<'a>> for MapEntryRef<'a>
sourcefn eq(&self, other: &MapEntryRef<'a>) -> bool
fn eq(&self, other: &MapEntryRef<'a>) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &MapEntryRef<'a>) -> bool
fn ne(&self, other: &MapEntryRef<'a>) -> bool
This method tests for !=
.
impl<'a> StructuralPartialEq for MapEntryRef<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for MapEntryRef<'a>
impl<'a> Send for MapEntryRef<'a>
impl<'a> Sync for MapEntryRef<'a>
impl<'a> Unpin for MapEntryRef<'a>
impl<'a> UnwindSafe for MapEntryRef<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more