pub struct OptionComponent<T> { /* private fields */ }
Implementations§
source§impl<T: AsyncComponent> OptionComponent<T>
impl<T: AsyncComponent> OptionComponent<T>
pub const fn new(component: Option<T>) -> Self
pub const fn is_none(&self) -> bool
pub const fn is_some(&self) -> bool
pub const fn get(&self) -> Option<&T>
pub fn get_mut(&mut self) -> Option<&mut T>
pub fn take(&mut self) -> Option<()>
pub fn set(&mut self, component: Option<T>)
Trait Implementations§
source§impl<T: AsyncComponent> AsyncComponent for OptionComponent<T>
impl<T: AsyncComponent> AsyncComponent for OptionComponent<T>
source§impl<T: Debug> Debug for OptionComponent<T>
impl<T: Debug> Debug for OptionComponent<T>
source§impl<T: Default> Default for OptionComponent<T>
impl<T: Default> Default for OptionComponent<T>
source§fn default() -> OptionComponent<T>
fn default() -> OptionComponent<T>
Returns the “default value” for a type. Read more