[−][src]Struct protobuf::singular::SingularField
Methods
impl<T> SingularField<T>
[src][−]
pub fn some(value: T) -> SingularField<T>
[src]
pub fn is_some(&self) -> bool
[src]
pub fn is_none(&self) -> bool
[src]
pub fn into_option(self) -> Option<T>
[src]
pub fn as_ref<'a>(&'a self) -> Option<&'a T>
[src]
pub fn as_mut<'a>(&'a mut self) -> Option<&'a mut T>
[src]
pub fn get_ref<'a>(&'a self) -> &'a T
[src]
pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T
[src]
pub fn unwrap(self) -> T
[src]
pub fn unwrap_or(self, def: T) -> T
[src]
pub fn unwrap_or_else<F>(self, f: F) -> T where
F: FnOnce() -> T,
[src]
F: FnOnce() -> T,
pub fn map<U, F>(self, f: F) -> SingularPtrField<U> where
F: FnOnce(T) -> U,
[src]
F: FnOnce(T) -> U,
pub fn iter<'a>(&'a self) -> IntoIter<&'a T>
[src]
pub fn mut_iter<'a>(&'a mut self) -> IntoIter<&'a mut T>
[src]
pub fn clear(&mut self)
[src]
impl<T: Default> SingularField<T>
[src][−]
pub fn none() -> SingularField<T>
[src]
pub fn from_option(option: Option<T>) -> SingularField<T>
[src]
pub fn take(&mut self) -> Option<T>
[src]
impl<T: Default + Clear> SingularField<T>
[src][−]
pub fn unwrap_or_default(self) -> T
[src]
pub fn set_default<'a>(&'a mut self) -> &'a mut T
[src]
Trait Implementations
impl<T: Eq> Eq for SingularField<T>
[src]
impl<T: Default> Default for SingularField<T>
[src][+]
impl<T: Clone + Default> Clone for SingularField<T>
[src][+]
impl<T: PartialEq> PartialEq<SingularField<T>> for SingularField<T>
[src][+]
impl<'a, T> IntoIterator for &'a SingularField<T>
[src][+]
impl<T: Hash> Hash for SingularField<T>
[src][+]
impl<T: Debug> Debug for SingularField<T>
[src][+]
Auto Trait Implementations
impl<T> Send for SingularField<T> where
T: Send,
T: Send,
impl<T> Unpin for SingularField<T> where
T: Unpin,
T: Unpin,
impl<T> Sync for SingularField<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for SingularField<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for SingularField<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> From<T> for T
[src][+]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,