Struct ashpd::desktop::file_chooser::SaveFileRequest
source · pub struct SaveFileRequest { /* private fields */ }
Expand description
A builder-pattern type to save a file.
Implementations§
source§impl SaveFileRequest
impl SaveFileRequest
sourcepub fn identifier(self, identifier: impl Into<Option<WindowIdentifier>>) -> Self
pub fn identifier(self, identifier: impl Into<Option<WindowIdentifier>>) -> Self
Sets a window identifier.
sourcepub fn title<'a>(self, title: impl Into<Option<&'a str>>) -> Self
pub fn title<'a>(self, title: impl Into<Option<&'a str>>) -> Self
Sets a title for the file chooser dialog.
sourcepub fn accept_label<'a>(self, accept_label: impl Into<Option<&'a str>>) -> Self
pub fn accept_label<'a>(self, accept_label: impl Into<Option<&'a str>>) -> Self
Sets a user-visible string to the “accept” button.
sourcepub fn modal(self, modal: impl Into<Option<bool>>) -> Self
pub fn modal(self, modal: impl Into<Option<bool>>) -> Self
Sets whether the dialog should be a modal.
sourcepub fn current_name<'a>(self, current_name: impl Into<Option<&'a str>>) -> Self
pub fn current_name<'a>(self, current_name: impl Into<Option<&'a str>>) -> Self
Sets the current file name.
sourcepub fn current_folder<P: AsRef<Path>>(
self,
current_folder: impl Into<Option<P>>,
) -> Result<Self, Error>
pub fn current_folder<P: AsRef<Path>>( self, current_folder: impl Into<Option<P>>, ) -> Result<Self, Error>
Sets the current folder.
sourcepub fn current_file<P: AsRef<Path>>(
self,
current_file: impl Into<Option<P>>,
) -> Result<Self, Error>
pub fn current_file<P: AsRef<Path>>( self, current_file: impl Into<Option<P>>, ) -> Result<Self, Error>
Sets the absolute path of the file.
sourcepub fn filter(self, filter: FileFilter) -> Self
pub fn filter(self, filter: FileFilter) -> Self
Adds a files filter.
sourcepub fn filters(self, filters: impl IntoIterator<Item = FileFilter>) -> Self
pub fn filters(self, filters: impl IntoIterator<Item = FileFilter>) -> Self
Adds a list of files filters.
sourcepub fn current_filter(
self,
current_filter: impl Into<Option<FileFilter>>,
) -> Self
pub fn current_filter( self, current_filter: impl Into<Option<FileFilter>>, ) -> Self
Sets the default filter.
sourcepub fn choices(self, choices: impl IntoIterator<Item = Choice>) -> Self
pub fn choices(self, choices: impl IntoIterator<Item = Choice>) -> Self
Adds a list of choices.
Trait Implementations§
source§impl Debug for SaveFileRequest
impl Debug for SaveFileRequest
source§impl Default for SaveFileRequest
impl Default for SaveFileRequest
source§fn default() -> SaveFileRequest
fn default() -> SaveFileRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SaveFileRequest
impl RefUnwindSafe for SaveFileRequest
impl Send for SaveFileRequest
impl Sync for SaveFileRequest
impl Unpin for SaveFileRequest
impl UnwindSafe for SaveFileRequest
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> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
source§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.