pub enum Request {
Pick {
id: u64,
mode: PickMode,
multiple: bool,
title: String,
accept_label: String,
suggested_name: Option<String>,
filters: Vec<Filter>,
},
Reopen {
id: u64,
reference: PathBuf,
write: bool,
},
Saved {
id: u64,
reference: PathBuf,
},
PickContents {
id: u64,
multiple: bool,
directory: bool,
title: String,
accept_label: String,
filters: Vec<Filter>,
},
ReadContents {
id: u64,
grant: FilePortalGrant,
offset: u64,
max_bytes: u32,
},
ReleaseContents {
id: u64,
grant: FilePortalGrant,
},
Open {
id: u64,
path: PathBuf,
},
OpenUri {
id: u64,
uri: String,
},
ChooseApp {
id: u64,
purpose: String,
},
AwaitIdentity {
id: u64,
},
ChooseIdentity {
id: u64,
},
}Variants§
Pick
Fields
Reopen
Turn a reference the chooser answered back into an open file: a window restored on the
file it showed, or a file inside a folder the person chose. write asks for a Save’s
file beside it, opened for writing.
Saved
A Save’s bytes are written through the descriptor: rename the file beside the chosen one over it.
PickContents
Retired: a choice of bytes, answered as no request this host serves. Read as what it means now — the app gets no files — never written.
Fields
ReadContents
Retired: a read of a contents grant. See Self::PickContents.
ReleaseContents
Retired: the release of a contents grant. See Self::PickContents.
Open
OpenUri
ChooseApp
AwaitIdentity
ChooseIdentity
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Request
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Forget for Request
impl Freeze for Request
impl Move for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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