Enum script::dom::bindings::conversions::ConversionResult
source · Expand description
An enum to better support enums through FromJSValConvertible::from_jsval.
Variants
Success(T)
Everything went fine.
Failure(Cow<'static, str>)
Conversion failed, without a pending exception.
Implementations
sourceimpl<T> ConversionResult<T>
impl<T> ConversionResult<T>
sourcepub fn get_success_value(&self) -> Option<&T>
pub fn get_success_value(&self) -> Option<&T>
Returns Some(value) if it is ConversionResult::Success
.
Trait Implementations
sourceimpl<T> Clone for ConversionResult<T>where
T: Clone,
impl<T> Clone for ConversionResult<T>where
T: Clone,
sourcefn clone(&self) -> ConversionResult<T>
fn clone(&self) -> ConversionResult<T>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl<T> Debug for ConversionResult<T>where
T: Debug,
impl<T> Debug for ConversionResult<T>where
T: Debug,
sourceimpl<T> PartialEq<ConversionResult<T>> for ConversionResult<T>where
T: PartialEq<T>,
impl<T> PartialEq<ConversionResult<T>> for ConversionResult<T>where
T: PartialEq<T>,
sourcefn eq(&self, other: &ConversionResult<T>) -> bool
fn eq(&self, other: &ConversionResult<T>) -> bool
impl<T> Eq for ConversionResult<T>where
T: Eq,
impl<T> StructuralEq for ConversionResult<T>
impl<T> StructuralPartialEq for ConversionResult<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for ConversionResult<T>where
T: RefUnwindSafe,
impl<T> Send for ConversionResult<T>where
T: Send,
impl<T> Sync for ConversionResult<T>where
T: Sync,
impl<T> Unpin for ConversionResult<T>where
T: Unpin,
impl<T> UnwindSafe for ConversionResult<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert