pub struct SwitchDefault<C> {
pub enabled: bool,
pub content: C,
}
Expand description
Type used to specify the default value for type Switch
.
It allows setting the enabled state and its content when set to enabled.
Fields§
§enabled: bool
§content: C
Trait Implementations§
Source§impl<C: Clone> Clone for SwitchDefault<C>
impl<C: Clone> Clone for SwitchDefault<C>
Source§fn clone(&self) -> SwitchDefault<C>
fn clone(&self) -> SwitchDefault<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C: Debug> Debug for SwitchDefault<C>
impl<C: Debug> Debug for SwitchDefault<C>
Source§impl<'de, C> Deserialize<'de> for SwitchDefault<C>where
C: Deserialize<'de>,
impl<'de, C> Deserialize<'de> for SwitchDefault<C>where
C: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<C> Freeze for SwitchDefault<C>where
C: Freeze,
impl<C> RefUnwindSafe for SwitchDefault<C>where
C: RefUnwindSafe,
impl<C> Send for SwitchDefault<C>where
C: Send,
impl<C> Sync for SwitchDefault<C>where
C: Sync,
impl<C> Unpin for SwitchDefault<C>where
C: Unpin,
impl<C> UnwindSafe for SwitchDefault<C>where
C: UnwindSafe,
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