pub struct SettingsRowProps {
pub label: String,
pub description: Option<String>,
pub control_id: Option<String>,
pub id: Option<String>,
pub leading: Option<Element>,
pub control: Option<Callback<SettingsRowControlProps, Element>>,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
pub children: Element,
}Expand description
Props for SettingsRow.
Fields§
§label: StringVisible label. It becomes the accessible name of the control.
description: Option<String>Supporting sentence under the label, with the id {control_id}-description.
control_id: Option<String>Id of the control. The label points at it with for, and the label and description ids
derive from it ({control_id}-label, {control_id}-description).
id: Option<String>Id of the row. Without a control_id, the derived ids use it as their prefix.
leading: Option<Element>Icon or graphic before the text. Mark decorative icons as hidden.
control: Option<Callback<SettingsRowControlProps, Element>>Renders the control with the ids it needs, like lumen-react’s function child. It wins over
children. Without a control_id, the control id is {id}-control.
class: Option<String>Extra classes appended after the Lumen class.
attributes: Vec<Attribute>Any other <div> or global attribute.
children: ElementThe control at the end of the row, when it does not use control.
Implementations§
Source§impl SettingsRowProps
impl SettingsRowProps
Sourcepub fn builder() -> SettingsRowPropsBuilder<((), (), (), (), (), (), (), (), ())>
pub fn builder() -> SettingsRowPropsBuilder<((), (), (), (), (), (), (), (), ())>
Create a builder for building SettingsRowProps.
On the builder, call .label(...), .description(...)(optional), .control_id(...)(optional), .id(...)(optional), .leading(...)(optional), .control(...)(optional), .class(...)(optional), .attributes(...)(optional), .children(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SettingsRowProps.
Trait Implementations§
Source§impl Clone for SettingsRowProps
impl Clone for SettingsRowProps
Source§impl PartialEq for SettingsRowProps
impl PartialEq for SettingsRowProps
Source§impl Properties for SettingsRowPropswhere
Self: Clone,
impl Properties for SettingsRowPropswhere
Self: Clone,
Source§type Builder = SettingsRowPropsBuilder<((), (), (), (), (), (), (), (), ())>
type Builder = SettingsRowPropsBuilder<((), (), (), (), (), (), (), (), ())>
Source§fn memoize(&mut self, new: &Self) -> bool
fn memoize(&mut self, new: &Self) -> bool
Source§fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
fn into_vcomponent<M>(
self,
render_fn: impl ComponentFunction<Self, M>,
) -> VComponentwhere
M: 'static,
impl StructuralPartialEq for SettingsRowProps
Auto Trait Implementations§
impl !Freeze for SettingsRowProps
impl !RefUnwindSafe for SettingsRowProps
impl !Send for SettingsRowProps
impl !Sync for SettingsRowProps
impl !UnwindSafe for SettingsRowProps
impl Forget for SettingsRowProps
impl Move for SettingsRowProps
impl Unpin for SettingsRowPropswhere
*const u8 is !null: Unpin,
Rc<VNodeInner>: Unpin,
Arc<Error>: Unpin,
NonZero<u32>: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut(SettingsRowControlProps) -> Result<VNode, RenderError>>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
&'static str: Unpin,
Rc<RefCell<dyn FnMut(Event<dyn Any>)>>: Unpin,
Rc<dyn AnyValue>: Unpin,
impl UnsafeUnpin for SettingsRowPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const RcInner<VNodeInner> is !null: UnsafeUnpin,
PhantomData<RcInner<VNodeInner>>: UnsafeUnpin,
*const ArcInner<Error> is !null: UnsafeUnpin,
PhantomData<ArcInner<Error>>: UnsafeUnpin,
NonZeroU32Inner: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<SettingsRowControlProps, Result<VNode, RenderError>>>>: UnsafeUnpin,
PhantomData<Attribute>: UnsafeUnpin,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DependencyElement for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more