Struct mozjs::jsapi::mozilla::GenericErrorResult
source · #[repr(C)]pub struct GenericErrorResult<E> {
pub mErrorValue: E,
pub _phantom_0: PhantomData<UnsafeCell<E>>,
}
Expand description
A type that auto-converts to an error Result. This is like a Result without a success type. It’s the best return type for functions that always return an error–functions designed to build and populate error objects. It’s also useful in error-handling macros; see MOZ_TRY for an example.
Fields§
§mErrorValue: E
§_phantom_0: PhantomData<UnsafeCell<E>>
Trait Implementations§
source§impl<E> Clone for GenericErrorResult<E>where
E: Clone,
impl<E> Clone for GenericErrorResult<E>where
E: Clone,
source§fn clone(&self) -> GenericErrorResult<E>
fn clone(&self) -> GenericErrorResult<E>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<E> Debug for GenericErrorResult<E>where
E: Debug,
impl<E> Debug for GenericErrorResult<E>where
E: Debug,
source§impl<E> PartialEq for GenericErrorResult<E>where
E: PartialEq,
impl<E> PartialEq for GenericErrorResult<E>where
E: PartialEq,
source§fn eq(&self, other: &GenericErrorResult<E>) -> bool
fn eq(&self, other: &GenericErrorResult<E>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<E> Copy for GenericErrorResult<E>where
E: Copy,
impl<E> StructuralPartialEq for GenericErrorResult<E>
Auto Trait Implementations§
impl<E> Freeze for GenericErrorResult<E>where
E: Freeze,
impl<E> !RefUnwindSafe for GenericErrorResult<E>
impl<E> Send for GenericErrorResult<E>where
E: Send,
impl<E> !Sync for GenericErrorResult<E>
impl<E> Unpin for GenericErrorResult<E>where
E: Unpin,
impl<E> UnwindSafe for GenericErrorResult<E>where
E: 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> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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