pub struct ComposePicker {
pub visible: bool,
pub input: String,
pub contacts: Vec<Contact>,
pub filtered: Vec<usize>,
pub selected: usize,
pub recipients: Vec<String>,
}Fields§
§visible: bool§input: String§contacts: Vec<Contact>§filtered: Vec<usize>§selected: usize§recipients: Vec<String>Already-chosen recipients.
Implementations§
Source§impl ComposePicker
impl ComposePicker
pub fn open(&mut self, contacts: Vec<Contact>)
pub fn close(&mut self)
pub fn on_char(&mut self, c: char)
pub fn on_backspace(&mut self)
pub fn select_next(&mut self)
pub fn select_prev(&mut self)
Sourcepub fn add_recipient(&mut self) -> bool
pub fn add_recipient(&mut self) -> bool
Add the selected contact (or raw input) to recipients. Returns true if added, false if nothing to add.
Trait Implementations§
Source§impl Default for ComposePicker
impl Default for ComposePicker
Source§fn default() -> ComposePicker
fn default() -> ComposePicker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ComposePicker
impl RefUnwindSafe for ComposePicker
impl Send for ComposePicker
impl Sync for ComposePicker
impl Unpin for ComposePicker
impl UnsafeUnpin for ComposePicker
impl UnwindSafe for ComposePicker
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
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>
Converts
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>
Converts
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