pub struct FileChooser<Msg> { /* private fields */ }Implementations§
Source§impl<Msg: Clone + Send + 'static> FileChooser<Msg>
impl<Msg: Clone + Send + 'static> FileChooser<Msg>
Sourcepub fn open(
sender: &ChannelSender<Msg>,
wrap: impl Fn(FileChooserMsg) -> Msg + Send + Sync + 'static,
) -> Self
pub fn open( sender: &ChannelSender<Msg>, wrap: impl Fn(FileChooserMsg) -> Msg + Send + Sync + 'static, ) -> Self
A chooser of a file to open, starting at the home folder. wrap makes the app’s message of the chooser’s own.
Sourcepub fn save(
sender: &ChannelSender<Msg>,
wrap: impl Fn(FileChooserMsg) -> Msg + Send + Sync + 'static,
name: impl Into<String>,
) -> Self
pub fn save( sender: &ChannelSender<Msg>, wrap: impl Fn(FileChooserMsg) -> Msg + Send + Sync + 'static, name: impl Into<String>, ) -> Self
A chooser of where to save a file, offering name, which it gives the focus.
Sourcepub fn filter(self, types: &[&str]) -> Self
pub fn filter(self, types: &[&str]) -> Self
Show only the files of these types besides the folders: MIME types such as text/plain, or a whole kind such as image/*.
Sourcepub fn sort(self, sort: Sort) -> Self
pub fn sort(self, sort: Sort) -> Self
In this order instead of by name, as the app kept it from Self::current_sort.
pub fn current_sort(&self) -> Sort
Sourcepub fn compact(self, on: bool) -> Self
pub fn compact(self, on: bool) -> Self
Laid out for a narrow screen: the places behind a button instead of beside the files.
pub fn purpose(&self) -> Purpose
pub fn current_dir(&self) -> &Path
Sourcepub fn take_focus_request(&mut self) -> Option<WidgetId>
pub fn take_focus_request(&mut self) -> Option<WidgetId>
The field to focus, once after it changed; an app hands it on from crate::App::take_focus_request.
pub fn view(&self) -> Element<Msg>
Sourcepub fn update(&mut self, msg: FileChooserMsg) -> Option<Chosen>
pub fn update(&mut self, msg: FileChooserMsg) -> Option<Chosen>
Take one of the chooser’s messages; Some once the user chose.
Auto Trait Implementations§
impl<Msg> Freeze for FileChooser<Msg>
impl<Msg> !RefUnwindSafe for FileChooser<Msg>
impl<Msg> Send for FileChooser<Msg>where
Msg: Send,
impl<Msg> Sync for FileChooser<Msg>where
Msg: Send,
impl<Msg> Unpin for FileChooser<Msg>
impl<Msg> !UnwindSafe for FileChooser<Msg>
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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