Enum rkyv_test::result::ArchivedResult
source · [−]#[repr(u8)]
pub enum ArchivedResult<T, E> {
Ok(T),
Err(E),
}
Variants
Ok(T)
Contains the success value
Err(E)
Contains the error value
Implementations
sourceimpl<T, E> ArchivedResult<T, E>
impl<T, E> ArchivedResult<T, E>
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>
.
sourceimpl<T: Deref, E> ArchivedResult<T, E>
impl<T: Deref, E> ArchivedResult<T, E>
sourceimpl<T: DerefMut, E> ArchivedResult<T, E>
impl<T: DerefMut, E> ArchivedResult<T, E>
Trait Implementations
sourceimpl<__C: ?Sized, T, E> CheckBytes<__C> for ArchivedResult<T, E> where
T: CheckBytes<__C>,
E: CheckBytes<__C>,
impl<__C: ?Sized, T, E> CheckBytes<__C> for ArchivedResult<T, E> where
T: CheckBytes<__C>,
E: CheckBytes<__C>,
type Error = EnumCheckError<u8>
type Error = EnumCheckError<u8>
The error that may result from checking the type.
sourceunsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, EnumCheckError<u8>>
unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, EnumCheckError<u8>>
Checks whether the given pointer points to a valid value within the given context. Read more
sourceimpl<T: Debug, E: Debug> Debug for ArchivedResult<T, E>
impl<T: Debug, E: Debug> Debug for ArchivedResult<T, E>
sourceimpl<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>,
sourceimpl<T: Hash, E: Hash> Hash for ArchivedResult<T, E>
impl<T: Hash, E: Hash> Hash for ArchivedResult<T, E>
sourceimpl<T: Ord, E: Ord> Ord for ArchivedResult<T, E>
impl<T: Ord, E: Ord> Ord for ArchivedResult<T, E>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq, E: PartialEq> PartialEq<ArchivedResult<T, E>> for ArchivedResult<T, E>
impl<T: PartialEq, E: PartialEq> PartialEq<ArchivedResult<T, E>> for ArchivedResult<T, E>
sourceimpl<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>
sourcefn 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 ==
. Read more
sourceimpl<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>
sourceimpl<T: PartialOrd, E: PartialOrd> PartialOrd<ArchivedResult<T, E>> for ArchivedResult<T, E>
impl<T: PartialOrd, E: PartialOrd> PartialOrd<ArchivedResult<T, E>> for ArchivedResult<T, E>
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl<T: Eq, E: Eq> Eq for ArchivedResult<T, E>
Auto Trait Implementations
impl<T, E> RefUnwindSafe for ArchivedResult<T, E> where
E: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, E> Send for ArchivedResult<T, E> where
E: Send,
T: Send,
impl<T, E> Sync for ArchivedResult<T, E> where
E: Sync,
T: Sync,
impl<T, E> Unpin for ArchivedResult<T, E> where
E: Unpin,
T: Unpin,
impl<T, E> UnwindSafe for ArchivedResult<T, E> where
E: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn 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.
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