Enum js::conversions::ConversionResult
[−]
[src]
pub enum ConversionResult<T> {
Success(T),
Failure(Cow<'static, str>),
}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.
Methods
impl<T> ConversionResult<T>[src]
pub fn get_success_value(&self) -> Option<&T>[src]
Returns Some(value) if it is ConversionResult::Success.
Trait Implementations
impl<T: PartialEq> PartialEq for ConversionResult<T>[src]
fn eq(&self, __arg_0: &ConversionResult<T>) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ConversionResult<T>) -> bool[src]
This method tests for !=.
impl<T: Eq> Eq for ConversionResult<T>[src]
impl<T: Clone> Clone for ConversionResult<T>[src]
fn clone(&self) -> ConversionResult<T>[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more