Enum rkyv::result::ArchivedResult [−][src]
#[repr(u8)]
pub enum ArchivedResult<T, E> {
Ok(T),
Err(E),
}
Variants
Contains the success value
Contains the error value
Implementations
Returns a Result
containing the success and error values of this ArchivedResult
.
Converts from &mut ArchivedResult<T, E>
to Result<&mut T, &mut E>
.
Returns an iterator over the possibly contained value.
The iterator yields one value if the result is ArchivedResult::Ok
, otherwise none.
Trait Implementations
impl<__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.
unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, Self::Error>
unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
impl<T, E, D: ?Sized> 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: ?Sized> 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>,
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
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
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more