pub struct SaveDestination { /* private fields */ }Implementations§
Source§impl SaveDestination
impl SaveDestination
pub fn at(path: impl Into<PathBuf>) -> SaveDestination
Sourcepub fn kept(
name: impl Into<String>,
write: impl Fn(Vec<u8>) -> Receiver<SaveOutcome> + Send + Sync + 'static,
) -> SaveDestination
pub fn kept( name: impl Into<String>, write: impl Fn(Vec<u8>) -> Receiver<SaveOutcome> + Send + Sync + 'static, ) -> SaveDestination
A destination the host keeps and the app cannot reach by path, named
name: write hands the bytes to write, once per
save.
Sourcepub fn kept_at(
name: impl Into<String>,
reference: PathBuf,
write: impl Fn(Vec<u8>) -> Receiver<SaveOutcome> + Send + Sync + 'static,
) -> SaveDestination
pub fn kept_at( name: impl Into<String>, reference: PathBuf, write: impl Fn(Vec<u8>) -> Receiver<SaveOutcome> + Send + Sync + 'static, ) -> SaveDestination
A destination the host keeps and names by reference: the same place reopened for every
later Save, and what the window shows from then on.
pub fn name(&self) -> &str
Sourcepub fn location(&self) -> Option<&Path>
pub fn location(&self) -> Option<&Path>
Where the saved file is on this device, when it has a path: to save
there again in place, never for showing. None on the web.
Sourcepub fn reference(&self) -> Option<&Path>
pub fn reference(&self) -> Option<&Path>
What names the saved file on a host whose files have no path: the documents-store
reference the chooser answers to reopen it. None where Self::location has one.
Trait Implementations§
Source§impl Clone for SaveDestination
impl Clone for SaveDestination
Source§fn clone(&self) -> SaveDestination
fn clone(&self) -> SaveDestination
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SaveDestination
impl !UnwindSafe for SaveDestination
impl Forget for SaveDestination
impl Freeze for SaveDestination
impl Move for SaveDestination
impl Send for SaveDestination
impl Sync for SaveDestination
impl Unpin for SaveDestination
impl UnsafeUnpin for SaveDestination
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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