pub struct WidgetExample {
pub id: String,
pub title: String,
pub description: String,
pub state: WidgetState,
pub variant: WidgetVariant,
pub size: ComponentSize,
pub role: ComponentRole,
}Fields§
§id: String§title: String§description: String§state: WidgetState§variant: WidgetVariant§size: ComponentSize§role: ComponentRoleImplementations§
Source§impl WidgetExample
impl WidgetExample
pub fn new( id: impl Into<String>, title: impl Into<String>, description: impl Into<String>, ) -> Self
pub fn with_state(self, state: WidgetState) -> Self
pub fn with_variant(self, variant: WidgetVariant) -> Self
pub fn with_size(self, size: ComponentSize) -> Self
pub fn with_role(self, role: ComponentRole) -> Self
pub fn sanitized(self) -> Self
Trait Implementations§
Source§impl Clone for WidgetExample
impl Clone for WidgetExample
Source§fn clone(&self) -> WidgetExample
fn clone(&self) -> WidgetExample
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 Debug for WidgetExample
impl Debug for WidgetExample
Source§impl<'de> Deserialize<'de> for WidgetExample
impl<'de> Deserialize<'de> for WidgetExample
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
Source§impl PartialEq for WidgetExample
impl PartialEq for WidgetExample
Source§fn eq(&self, other: &WidgetExample) -> bool
fn eq(&self, other: &WidgetExample) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for WidgetExample
impl Serialize for WidgetExample
impl StructuralPartialEq for WidgetExample
Auto Trait Implementations§
impl Freeze for WidgetExample
impl RefUnwindSafe for WidgetExample
impl Send for WidgetExample
impl Sync for WidgetExample
impl Unpin for WidgetExample
impl UnsafeUnpin for WidgetExample
impl UnwindSafe for WidgetExample
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