pub enum PasteType {
Normal,
Values,
Formula,
Format,
}Expand description
PasteType — what a paste request carries, per the Sheets API’s own
enum (issue #1839, ADR-0083 §4).
Curated: four of the API’s seven variants. PASTE_NORMAL,
PASTE_VALUES, PASTE_FORMULA and PASTE_FORMAT cover the common
cases (a plain copy or cut, a values-only or formula-only copy, and a
format-only copy); PASTE_NO_BORDERS, PASTE_DATA_VALIDATION and
PASTE_CONDITIONAL_FORMATTING are deferred — a documented cut, not a
silent gap (docs/drive.md’s cut-paste/copy-paste/paste-data section
names it). No default arm anywhere this is matched: a variant this enum
doesn’t carry is unrepresentable, and the one place a (writes_values, writes_presentation) pair is turned into a gate resolves an
unrecognised combination to both operations, so a type added here
without updating that table can only ever be stricter than intended,
never weaker.
Variants§
Normal
Values, formulas, formats and merges — the API’s own default and
what “paste” means to a Sheets user. Resolves both
SheetsWrite and SheetsStructure (ADR-0083 §4).
Values
Cell content only, evaluated formulas rendered to their values.
Resolves SheetsWrite alone.
Formula
Cell content only, formulas preserved. Resolves SheetsWrite alone.
Format
The cell format only, excluding data validation. Resolves
SheetsStructure alone.
Implementations§
Source§impl PasteType
impl PasteType
Sourcepub const fn writes_values(self) -> bool
pub const fn writes_values(self) -> bool
Whether this paste type writes cell content — the half SheetsWrite
covers.
Sourcepub const fn writes_presentation(self) -> bool
pub const fn writes_presentation(self) -> bool
Whether this paste type writes formats or merges — the half
SheetsStructure covers.
Trait Implementations§
impl Copy for PasteType
impl Eq for PasteType
impl StructuralPartialEq for PasteType
Auto Trait Implementations§
impl Freeze for PasteType
impl RefUnwindSafe for PasteType
impl Send for PasteType
impl Sync for PasteType
impl Unpin for PasteType
impl UnsafeUnpin for PasteType
impl UnwindSafe for PasteType
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
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
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> ⓘ
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> ⓘ
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