Struct protobuf::singular::SingularField
[−]
[src]
pub struct SingularField<T> { /* fields omitted */ }
Methods
impl<T> SingularField<T>
[src]
fn some(value: T) -> SingularField<T>
fn is_some(&self) -> bool
fn is_none(&self) -> bool
fn into_option(self) -> Option<T>
fn as_ref<'a>(&'a self) -> Option<&'a T>
fn as_mut<'a>(&'a mut self) -> Option<&'a mut T>
fn get_ref<'a>(&'a self) -> &'a T
fn get_mut_ref<'a>(&'a mut self) -> &'a mut T
fn unwrap(self) -> T
fn unwrap_or(self, def: T) -> T
fn unwrap_or_else<F>(self, f: F) -> T where F: FnOnce() -> T
fn map<U, F>(self, f: F) -> SingularPtrField<U> where F: FnOnce(T) -> U
fn iter<'a>(&'a self) -> IntoIter<&'a T>
fn mut_iter<'a>(&'a mut self) -> IntoIter<&'a mut T>
fn clear(&mut self)
impl<T: Default> SingularField<T>
[src]
fn none() -> SingularField<T>
fn from_option(option: Option<T>) -> SingularField<T>
fn take(&mut self) -> Option<T>
impl<T: Default + Clear> SingularField<T>
[src]
fn unwrap_or_default(self) -> T
fn set_default<'a>(&'a mut self) -> &'a mut T
Trait Implementations
impl<T: Default> Default for SingularField<T>
[src]
fn default() -> SingularField<T>
Returns the "default value" for a type. Read more
impl<T: Clone + Default> Clone for SingularField<T>
[src]
fn clone(&self) -> SingularField<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Debug> Debug for SingularField<T>
[src]
impl<T: PartialEq> PartialEq for SingularField<T>
[src]
fn eq(&self, other: &SingularField<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.
impl<T: Eq> Eq for SingularField<T>
[src]
impl<T: Hash> Hash for SingularField<T>
[src]
fn hash<H: Hasher>(&self, state: &mut H)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.