pub struct Spreadsheet {
pub spreadsheet_id: Option<String>,
pub properties: Option<SpreadsheetProperties>,
pub sheets: Vec<Sheet>,
pub named_ranges: Vec<NamedRange>,
}Expand description
A spreadsheet’s metadata, from spreadsheets.get.
Always request an explicit fields mask when fetching this: the
unmasked response embeds every cell of every sheet, which on a large
workbook is an out-of-memory failure rather than a slow request.
PartialEq-only, not Eq (issue #1793): a Sheet’s
conditional_formats can embed a Color (f32-based), which has no
meaningful Eq — see Color’s own doc comment.
Fields§
§spreadsheet_id: Option<String>The spreadsheet’s id (echoes the one requested).
properties: Option<SpreadsheetProperties>Workbook-level properties, notably its title.
sheets: Vec<Sheet>The sheets (tabs) it contains, in workbook order.
named_ranges: Vec<NamedRange>Named ranges defined anywhere in the workbook. A named range is
workbook-scoped, not sheet-scoped (unlike ProtectedRange, which
nests under the Sheet it protects), so this lives here rather
than on Sheet. Empty unless the caller requested it with a wider
fields mask — SPREADSHEET_FIELDS (the mask every other call uses)
omits this; only SheetsApi::get_spreadsheet_with_named_ranges
populates it.
Implementations§
Source§impl Spreadsheet
impl Spreadsheet
Sourcepub fn sheet_titles(&self) -> Vec<String>
pub fn sheet_titles(&self) -> Vec<String>
Every sheet title, in workbook order.
Sourcepub fn has_sheet_titled(&self, title: &str) -> bool
pub fn has_sheet_titled(&self, title: &str) -> bool
Whether any sheet in the workbook currently uses title as its
display title — the collision check drive sheets rename-sheet/
duplicate-sheet (via structure.rs’s resolve_sheet) and drive lease restore’s best-effort rename-back (issue #1676) share, so a
future change to what counts as “the same title” (e.g.
case-insensitive) lands in one place rather than drifting between
two hand-written copies.
A sheet with no properties never matches, not even "" — it has no
title at all, so Sheet::title()’s "" fallback (meant for display)
would otherwise falsely collide with an explicit empty-title request.
Trait Implementations§
Source§impl Clone for Spreadsheet
impl Clone for Spreadsheet
Source§impl Debug for Spreadsheet
impl Debug for Spreadsheet
Source§impl Default for Spreadsheet
impl Default for Spreadsheet
Source§impl<'de> Deserialize<'de> for Spreadsheet
impl<'de> Deserialize<'de> for Spreadsheet
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>,
Source§impl JsonlSerialize for Spreadsheet
impl JsonlSerialize for Spreadsheet
Source§impl PartialEq for Spreadsheet
impl PartialEq for Spreadsheet
Source§impl Serialize for Spreadsheet
impl Serialize for Spreadsheet
impl StructuralPartialEq for Spreadsheet
Auto Trait Implementations§
impl Freeze for Spreadsheet
impl RefUnwindSafe for Spreadsheet
impl Send for Spreadsheet
impl Sync for Spreadsheet
impl Unpin for Spreadsheet
impl UnsafeUnpin for Spreadsheet
impl UnwindSafe for Spreadsheet
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,
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> ⓘ
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