Enum webdriver::common::Nullable
[−]
[src]
pub enum Nullable<T: ToJson> { Value(T), Null, }
Variants
Value(T)
Null
Methods
impl<T: ToJson> Nullable<T>
[src]
pub fn is_null(&self) -> bool
[src]
pub fn is_value(&self) -> bool
[src]
pub fn map<F, U: ToJson>(self, f: F) -> Nullable<U> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
impl<T: ToJson> Nullable<T>
[src]
pub fn from_json<F: FnOnce(&Json) -> WebDriverResult<T>>(
value: &Json,
f: F
) -> WebDriverResult<Nullable<T>>
[src]
value: &Json,
f: F
) -> WebDriverResult<Nullable<T>>
Trait Implementations
impl<T: Clone + ToJson> Clone for Nullable<T>
[src]
fn clone(&self) -> Nullable<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
impl<T: Debug + ToJson> Debug for Nullable<T>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<T: PartialEq + ToJson> PartialEq for Nullable<T>
[src]
fn eq(&self, __arg_0: &Nullable<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: &Nullable<T>) -> bool
[src]
This method tests for !=
.
impl<T: ToJson> ToJson for Nullable<T>
[src]
impl<T: ToJson> Encodable for Nullable<T>
[src]
fn encode<S: Encoder>(&self, s: &mut S) -> Result<(), S::Error>
[src]
Serialize a value using an Encoder
.