pub struct OsBytes<S: BytesStorage> { /* private fields */ }Expand description
OsBytes provides a generic wrapper around byte storage types that implement the BytesStorage trait.
It allows for easy conversion between byte slices and various storage types, such as Box, Arc, Vec, or SlimmerBox.
( switch to arc for multithreading to avoid race conditions:))
Implementations§
Trait Implementations§
impl<S> Send for OsBytes<S>where
S: Send + BytesStorage + 'static,
Auto Trait Implementations§
impl<S> Freeze for OsBytes<S>where
S: Freeze,
impl<S> RefUnwindSafe for OsBytes<S>where
S: RefUnwindSafe,
impl<S> Sync for OsBytes<S>where
S: Sync,
impl<S> Unpin for OsBytes<S>where
S: Unpin,
impl<S> UnwindSafe for OsBytes<S>where
S: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneUnsized for Twhere
T: Clone,
impl<T> CloneUnsized for Twhere
T: Clone,
Source§fn unsized_clone_from(&mut self, source: &T)
fn unsized_clone_from(&mut self, source: &T)
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