Struct mozjs_sys::jsapi::mozilla::GenericErrorResult
source · #[repr(C)]pub struct GenericErrorResult<E> {
pub _phantom_0: PhantomData<UnsafeCell<E>>,
pub mErrorValue: 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§
§_phantom_0: PhantomData<UnsafeCell<E>>
§mErrorValue: E
Trait Implementations§
source§impl<E: Clone> Clone for GenericErrorResult<E>
impl<E: Clone> Clone for GenericErrorResult<E>
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> Debug for GenericErrorResult<E>
impl<E: Debug> Debug for GenericErrorResult<E>
source§impl<E: PartialEq> PartialEq for GenericErrorResult<E>
impl<E: PartialEq> PartialEq for GenericErrorResult<E>
impl<E: Copy> Copy for GenericErrorResult<E>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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