pub enum SlidesTarget {
Presentation(Box<DriveFile>),
Shortcut {
name: String,
},
NotAPresentation {
name: String,
mime_type: String,
},
}Expand description
What a Drive file id turned out to be.
Variants§
Presentation(Box<DriveFile>)
A Google Slides presentation. Carries the full metadata, so a write engine can read
parents for the gate without a second files.get.
Shortcut
A shortcut. Never followed — its own variant, because “this is not a Google Slides presentation” is a confusing thing to say about a shortcut to one.
NotAPresentation
Anything else.
Implementations§
Source§impl SlidesTarget
impl SlidesTarget
Sourcepub fn of(file: DriveFile) -> Self
pub fn of(file: DriveFile) -> Self
Classifies already-fetched metadata.
Split from classify so the mime-type reasoning is testable
without a server, and so a write engine that already holds the
metadata does not fetch it twice.
Sourcepub fn presentation(&self) -> Option<&DriveFile>
pub fn presentation(&self) -> Option<&DriveFile>
The presentation’s metadata, when this is one.
Sourcepub fn refusal_message(&self, verb: &str) -> Option<String>
pub fn refusal_message(&self, verb: &str) -> Option<String>
The refusal message, or None when this is a Google Slides presentation.
verb is the CLI spelling (read, info, …) so the message names
the command the user actually typed.
Trait Implementations§
Source§impl Clone for SlidesTarget
impl Clone for SlidesTarget
Source§impl Debug for SlidesTarget
impl Debug for SlidesTarget
impl Eq for SlidesTarget
Source§impl PartialEq for SlidesTarget
impl PartialEq for SlidesTarget
impl StructuralPartialEq for SlidesTarget
Auto Trait Implementations§
impl Freeze for SlidesTarget
impl RefUnwindSafe for SlidesTarget
impl Send for SlidesTarget
impl Sync for SlidesTarget
impl Unpin for SlidesTarget
impl UnsafeUnpin for SlidesTarget
impl UnwindSafe for SlidesTarget
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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