pub struct Entry<Val: Record> {
pub key: Val::SelfId,
pub val: Val,
}Fields§
§key: Val::SelfId§val: ValImplementations§
Source§impl<Val: Record> Entry<Val>
impl<Val: Record> Entry<Val>
pub fn new(key: Val::SelfId, val: Val) -> Self
pub fn key(self) -> Val::SelfId
pub fn value(&self) -> &Val
pub fn get_id(self) -> Val::SelfId
👎Deprecated
pub fn get_val(&self) -> &Val
👎Deprecated
pub fn split(self) -> (Val::SelfId, Val)
pub fn split_ref(&self) -> (&Val::SelfId, &Val)
pub fn split_mut(&mut self) -> (&mut Val::SelfId, &mut Val)
Trait Implementations§
Source§impl<Val> Rapira for Entry<Val>
impl<Val> Rapira for Entry<Val>
const STATIC_SIZE: Option<usize>
const MIN_SIZE: usize
Source§fn check_bytes(slice: &mut &[u8]) -> Result<()>
fn check_bytes(slice: &mut &[u8]) -> Result<()>
check bytes, collections len, check utf-8, NonZero, f32 and others…
Source§unsafe fn from_slice_unchecked(slice: &mut &[u8]) -> Result<Self>where
Self: Sized,
unsafe fn from_slice_unchecked(slice: &mut &[u8]) -> Result<Self>where
Self: Sized,
Safety Read more
Source§fn from_slice(slice: &mut &[u8]) -> Result<Self>where
Self: Sized,
fn from_slice(slice: &mut &[u8]) -> Result<Self>where
Self: Sized,
this is safe, but not check collections capacity!
recommend use only for safe data (example: from DB), not external data.
Source§unsafe fn from_slice_unsafe(slice: &mut &[u8]) -> Result<Self>where
Self: Sized,
unsafe fn from_slice_unsafe(slice: &mut &[u8]) -> Result<Self>where
Self: Sized,
Safety Read more
fn convert_to_bytes(&self, slice: &mut [u8], cursor: &mut usize)
fn try_convert_to_bytes( &self, slice: &mut [u8], cursor: &mut usize, ) -> Result<()>
fn debug_from_slice(slice: &mut &[u8]) -> Result<Self, RapiraError>
Auto Trait Implementations§
impl<Val> Freeze for Entry<Val>
impl<Val> RefUnwindSafe for Entry<Val>
impl<Val> Send for Entry<Val>
impl<Val> Sync for Entry<Val>
impl<Val> Unpin for Entry<Val>
impl<Val> UnwindSafe for Entry<Val>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more