Struct catalyst_entities::VSlice
source · pub struct VSlice<T: ?Sized>(_, _, _);Expand description
Virtual slice, usually attached to some collection. Uses indexing instead of pointers.
Implementations§
source§impl<T> VSlice<T>
impl<T> VSlice<T>
pub fn range(self) -> Range<usize>
pub fn len(self) -> usize
pub fn is_empty(self) -> bool
pub const fn empty() -> Self
pub fn keys(self) -> impl Iterator<Item = VRef<T>>
pub fn index(self, index: usize) -> VRef<T>
pub fn start(self) -> u32
pub fn slice(self, range: Range<usize>) -> Self
Trait Implementations§
source§impl<T: ?Sized> Archive for VSlice<T>where
u32: Archive,
PhantomData<*const T>: Archive,
impl<T: ?Sized> Archive for VSlice<T>where u32: Archive, PhantomData<*const T>: Archive,
source§impl<__D: Fallible + ?Sized, T: ?Sized> Deserialize<VSlice<T>, __D> for Archived<VSlice<T>>where
u32: Archive,
Archived<u32>: Deserialize<u32, __D>,
PhantomData<*const T>: Archive,
Archived<PhantomData<*const T>>: Deserialize<PhantomData<*const T>, __D>,
impl<__D: Fallible + ?Sized, T: ?Sized> Deserialize<VSlice<T>, __D> for Archived<VSlice<T>>where u32: Archive, Archived<u32>: Deserialize<u32, __D>, PhantomData<*const T>: Archive, Archived<PhantomData<*const T>>: Deserialize<PhantomData<*const T>, __D>,
source§impl<T: ?Sized> Ord for VSlice<T>
impl<T: ?Sized> Ord for VSlice<T>
source§impl<T: ?Sized> PartialEq<VSlice<T>> for VSlice<T>
impl<T: ?Sized> PartialEq<VSlice<T>> for VSlice<T>
source§impl<T: ?Sized> PartialOrd<VSlice<T>> for VSlice<T>
impl<T: ?Sized> PartialOrd<VSlice<T>> for VSlice<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<__S: Fallible + ?Sized, T: ?Sized> Serialize<__S> for VSlice<T>where
u32: Serialize<__S>,
PhantomData<*const T>: Serialize<__S>,
impl<__S: Fallible + ?Sized, T: ?Sized> Serialize<__S> for VSlice<T>where u32: Serialize<__S>, PhantomData<*const T>: Serialize<__S>,
impl<T: ?Sized> Copy for VSlice<T>
impl<T: ?Sized> Eq for VSlice<T>
impl<T: ?Sized> Send for VSlice<T>
impl<T: ?Sized> Sync for VSlice<T>
Auto Trait Implementations§
impl<T: ?Sized> ArchiveCopy for VSlice<T>
impl<T: ?Sized> NoInteriorMutability for VSlice<T>where T: NoInteriorMutability,
impl<T: ?Sized> RefUnwindSafe for VSlice<T>where T: RefUnwindSafe,
impl<T: ?Sized> Unpin for VSlice<T>
impl<T: ?Sized> UnwindSafe for VSlice<T>where T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
The archived counterpart of this type. Unlike
Archive, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
The resolver for the metadata of this type. Read more
source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata )
Creates the archived version of the metadata for this value at the given position and writes
it to the given output. Read more