#[repr(C, u8)]pub enum OptionComponentDef {
None,
Some(ComponentDef),
}Variants§
None
Some(ComponentDef)
Implementations§
Source§impl OptionComponentDef
impl OptionComponentDef
pub fn into_option(&self) -> Option<ComponentDef>
Source§impl OptionComponentDef
impl OptionComponentDef
pub fn as_option(&self) -> Option<&ComponentDef>
pub fn replace(&mut self, value: ComponentDef) -> OptionComponentDef
pub fn is_some(&self) -> bool
pub fn is_none(&self) -> bool
pub const fn as_ref(&self) -> Option<&ComponentDef>
pub fn as_mut(&mut self) -> Option<&mut ComponentDef>
pub fn map<U, F: FnOnce(ComponentDef) -> U>(self, f: F) -> Option<U>
pub fn and_then<U, F>(self, f: F) -> Option<U>
Trait Implementations§
Source§impl Clone for OptionComponentDef
impl Clone for OptionComponentDef
Source§fn clone(&self) -> OptionComponentDef
fn clone(&self) -> OptionComponentDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for OptionComponentDef
impl Default for OptionComponentDef
Source§fn default() -> OptionComponentDef
fn default() -> OptionComponentDef
Returns the “default value” for a type. Read more
Source§impl From<Option<ComponentDef>> for OptionComponentDef
impl From<Option<ComponentDef>> for OptionComponentDef
Source§fn from(o: Option<ComponentDef>) -> OptionComponentDef
fn from(o: Option<ComponentDef>) -> OptionComponentDef
Converts to this type from the input type.
Source§impl From<OptionComponentDef> for Option<ComponentDef>
impl From<OptionComponentDef> for Option<ComponentDef>
Source§fn from(o: OptionComponentDef) -> Option<ComponentDef>
fn from(o: OptionComponentDef) -> Option<ComponentDef>
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for OptionComponentDef
impl RefUnwindSafe for OptionComponentDef
impl Send for OptionComponentDef
impl Sync for OptionComponentDef
impl Unpin for OptionComponentDef
impl UnsafeUnpin for OptionComponentDef
impl UnwindSafe for OptionComponentDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more