pub struct SearchDialogProps {
pub id: String,
pub search: Callback<String, SearchDialogFuture>,
pub dialog: Option<SearchDialogController>,
pub labels: SearchDialogLabels,
pub shortcut: bool,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Props for SearchDialog.
Fields§
§id: StringDialog id. A SearchDialogTrigger target names it; the title and field ids derive
from it.
search: Callback<String, SearchDialogFuture>Returns the results for a query. A newer query, closing the dialog, or unmounting it drops the pending future, so a stale response never shows.
dialog: Option<SearchDialogController>A controller from use_search_dialog, shared with its SearchDialogTriggers.
labels: SearchDialogLabelsOverrides any of the default title, field, status, close, and retry labels.
shortcut: boolOpens the dialog with Ctrl+K or Command+K outside text fields (web and desktop). Defaults to true.
class: Option<String>Extra classes appended after the Lumen classes.
attributes: Vec<Attribute>Any other <dialog> or global attribute. The search attributes and id win over the same
names here.
Implementations§
Source§impl SearchDialogProps
impl SearchDialogProps
Sourcepub fn builder() -> SearchDialogPropsBuilder<((), (), (), (), (), (), ())>
pub fn builder() -> SearchDialogPropsBuilder<((), (), (), (), (), (), ())>
Create a builder for building SearchDialogProps.
On the builder, call .id(...), .search(...), .dialog(...)(optional), .labels(...)(optional), .shortcut(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of SearchDialogProps.
Trait Implementations§
Source§impl Clone for SearchDialogProps
impl Clone for SearchDialogProps
Source§impl PartialEq for SearchDialogProps
impl PartialEq for SearchDialogProps
Source§impl Properties for SearchDialogPropswhere
Self: Clone,
impl Properties for SearchDialogPropswhere
Self: Clone,
Source§type Builder = SearchDialogPropsBuilder<((), (), (), (), (), (), ())>
type Builder = SearchDialogPropsBuilder<((), (), (), (), (), (), ())>
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 SearchDialogProps
Auto Trait Implementations§
impl !RefUnwindSafe for SearchDialogProps
impl !Send for SearchDialogProps
impl !Sync for SearchDialogProps
impl !UnwindSafe for SearchDialogProps
impl Forget for SearchDialogProps
impl Freeze for SearchDialogPropswhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
&'static UnsyncStorage: Freeze,
NonZero<u64>: Freeze,
&'static Location<'static>: Freeze,
PhantomData<Option<ExternalListenerCallback<String, Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, String>>>>>>>: Freeze,
PhantomData<SignalData<bool>>: Freeze,
PhantomData<SignalData<Option<Rc<MountedData>>>>: Freeze,
PhantomData<SignalData<Option<&'static str>>>: Freeze,
PhantomData<SignalData<SearchDialogStatus>>: Freeze,
PhantomData<SignalData<u64>>: Freeze,
PhantomData<Attribute>: Freeze,
impl Move for SearchDialogProps
impl Unpin for SearchDialogPropswhere
*const u8 is !null: Unpin,
&'static UnsyncStorage: Unpin,
NonZero<u64>: Unpin,
&'static Location<'static>: Unpin,
Box<dyn FnMut(String) -> Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, String>>>>>: Unpin,
*const RcInner<Runtime> is !null: Unpin,
Arc<Mutex<HashSet<ReactiveContext>>>: Unpin,
Rc<MountedData>: Unpin,
&'static str: Unpin,
Rc<RefCell<dyn FnMut(Event<dyn Any>)>>: Unpin,
Rc<dyn AnyValue>: Unpin,
impl UnsafeUnpin for SearchDialogPropswhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
&'static UnsyncStorage: UnsafeUnpin,
NonZeroU64Inner: UnsafeUnpin,
&'static Location<'static>: UnsafeUnpin,
PhantomData<Option<ExternalListenerCallback<String, Pin<Box<dyn Future<Output = Result<Vec<SearchResult>, String>>>>>>>: UnsafeUnpin,
PhantomData<SignalData<bool>>: UnsafeUnpin,
PhantomData<SignalData<Option<Rc<MountedData>>>>: UnsafeUnpin,
PhantomData<SignalData<Option<&'static str>>>: UnsafeUnpin,
PhantomData<SignalData<SearchDialogStatus>>: UnsafeUnpin,
PhantomData<SignalData<u64>>: 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