Enum rkyv::result::ArchivedResult
source · #[repr(u8)]pub enum ArchivedResult<T, E> {
Ok(T),
Err(E),
}
Variants§
Implementations§
source§impl<T, E> ArchivedResult<T, E>
impl<T, E> ArchivedResult<T, E>
sourcepub fn unwrap_or_else<F>(self, op: F) -> Twhere
F: FnOnce(E) -> T,
pub fn unwrap_or_else<F>(self, op: F) -> Twhere
F: FnOnce(E) -> T,
Returns the contained Ok
value or computes it from a closure.
sourcepub fn as_ref(&self) -> Result<&T, &E>
pub fn as_ref(&self) -> Result<&T, &E>
Returns a Result
containing the success and error values of this ArchivedResult
.
sourcepub fn as_mut(&mut self) -> Result<&mut T, &mut E>
pub fn as_mut(&mut self) -> Result<&mut T, &mut E>
Converts from &mut ArchivedResult<T, E>
to Result<&mut T, &mut E>
.
source§impl<T: Deref, E> ArchivedResult<T, E>
impl<T: Deref, E> ArchivedResult<T, E>
source§impl<T: DerefMut, E> ArchivedResult<T, E>
impl<T: DerefMut, E> ArchivedResult<T, E>
Trait Implementations§
source§impl<T, E, D> Deserialize<Result<T, E>, D> for ArchivedResult<T::Archived, E::Archived>where
T: Archive,
E: Archive,
D: Fallible + ?Sized,
T::Archived: Deserialize<T, D>,
E::Archived: Deserialize<E, D>,
impl<T, E, D> Deserialize<Result<T, E>, D> for ArchivedResult<T::Archived, E::Archived>where
T: Archive,
E: Archive,
D: Fallible + ?Sized,
T::Archived: Deserialize<T, D>,
E::Archived: Deserialize<E, D>,
source§impl<T: Ord, E: Ord> Ord for ArchivedResult<T, E>
impl<T: Ord, E: Ord> Ord for ArchivedResult<T, E>
source§impl<T: PartialEq<U>, U, E: PartialEq<F>, F> PartialEq<ArchivedResult<T, E>> for Result<U, F>
impl<T: PartialEq<U>, U, E: PartialEq<F>, F> PartialEq<ArchivedResult<T, E>> for Result<U, F>
source§fn eq(&self, other: &ArchivedResult<T, E>) -> bool
fn eq(&self, other: &ArchivedResult<T, E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<T, U: PartialEq<T>, E, F: PartialEq<E>> PartialEq<Result<T, E>> for ArchivedResult<U, F>
impl<T, U: PartialEq<T>, E, F: PartialEq<E>> PartialEq<Result<T, E>> for ArchivedResult<U, F>
source§impl<T: PartialEq, E: PartialEq> PartialEq for ArchivedResult<T, E>
impl<T: PartialEq, E: PartialEq> PartialEq for ArchivedResult<T, E>
source§impl<T: PartialOrd, E: PartialOrd> PartialOrd for ArchivedResult<T, E>
impl<T: PartialOrd, E: PartialOrd> PartialOrd for ArchivedResult<T, E>
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 moreimpl<T: Eq, E: Eq> Eq for ArchivedResult<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for ArchivedResult<T, E>
impl<T, E> RefUnwindSafe for ArchivedResult<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for ArchivedResult<T, E>
impl<T, E> Sync for ArchivedResult<T, E>
impl<T, E> Unpin for ArchivedResult<T, E>
impl<T, E> UnwindSafe for ArchivedResult<T, E>where
T: UnwindSafe,
E: UnwindSafe,
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> 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