Skip to main content

Sheet

Struct Sheet 

Source
pub struct Sheet {
    pub properties: Option<SheetProperties>,
    pub protected_ranges: Vec<ProtectedRange>,
    pub basic_filter: Option<BasicFilter>,
    pub filter_views: Vec<FilterView>,
    pub conditional_formats: Vec<ConditionalFormatRule>,
    pub charts: Vec<EmbeddedChart>,
    pub slicers: Vec<Slicer>,
    pub banded_ranges: Vec<BandedRange>,
    pub row_groups: Vec<DimensionGroup>,
    pub column_groups: Vec<DimensionGroup>,
    pub data: Vec<GridData>,
}
Expand description

One sheet (tab) within a spreadsheet. PartialEq-only, not Eq (issue #1793) — see Spreadsheet’s doc comment.

Fields§

§properties: Option<SheetProperties>

This sheet’s properties.

§protected_ranges: Vec<ProtectedRange>

Protected ranges on this sheet. Empty unless the caller requested them with a wider fields mask — SPREADSHEET_FIELDS (the mask every other call uses) omits this, so a plain sheets info/ structure read never pays for it; only SheetsApi::get_spreadsheet_with_protections populates it.

§basic_filter: Option<BasicFilter>

This sheet’s basic filter, if it has one. Empty unless the caller requested it with a wider fields mask — only SheetsApi::get_spreadsheet_with_filter_views populates it (issue #1794).

§filter_views: Vec<FilterView>

The named, id-addressed filter views on this sheet. Empty unless the caller requested them with a wider fields mask — only SheetsApi::get_spreadsheet_with_filter_views populates it (issue #1794).

§conditional_formats: Vec<ConditionalFormatRule>

Conditional format rules on this sheet, in their API-defined evaluation order — the order add-conditional-format’s --index/ update-conditional-format’s and delete-conditional-format’s --index address. Empty unless the caller requested a wider fields mask; only SheetsApi::get_spreadsheet_with_conditional_formats populates it (issue #1793).

§charts: Vec<EmbeddedChart>

Charts embedded on this sheet. Empty unless the caller requested them with a wider fields mask — only SheetsApi::get_spreadsheet_with_embedded_objects populates it (issue #1797). chartId-addressed by update-chart/delete-chart; list-charts is how that id is discovered.

§slicers: Vec<Slicer>

Slicers embedded on this sheet. Empty unless the caller requested them with a wider fields mask — only SheetsApi::get_spreadsheet_with_embedded_objects populates it (issue #1797). slicerId-addressed by update-slicer/ delete-slicer; list-slicers is how that id is discovered.

§banded_ranges: Vec<BandedRange>

Banded ranges (alternating row/column colors) on this sheet. Empty unless the caller requested them with a wider fields mask — only SheetsApi::get_spreadsheet_with_banding populates it (issue #1832). bandedRangeId-addressed by update-banding/ delete-banding; list-bandings is how that id is discovered.

§row_groups: Vec<DimensionGroup>

Outline groups over row spans on this sheet — the collapsible +/- grouping bar. Empty unless the caller requested them with a wider fields mask — only SheetsApi::get_spreadsheet_with_dimension_groups populates it (issue #1833). Addressed by (range, depth); list-dimension-groups is how both are discovered.

§column_groups: Vec<DimensionGroup>

Outline groups over column spans on this sheet. Same population and addressing as Self::row_groups, the column axis.

§data: Vec<GridData>

Grid data — cell-by-cell, in row-major chunks — read back only when the caller asked for it via a fields mask naming individual cell properties. Empty unless the caller requested a wider mask; only SheetsApi::get_spreadsheet_with_pivot_tables/ SheetsApi::get_cell_pivot populate it (issue #1798). Chunked rather than one flat grid because the API itself returns it that way — see GridData’s doc comment.

Implementations§

Source§

impl Sheet

Source

pub fn title(&self) -> &str

This sheet’s title, or "" if absent.

Source

pub fn sheet_id(&self) -> Option<i64>

This sheet’s stable numeric id, or None if the properties (or the id within them) are absent from the response.

Source

pub fn hidden(&self) -> bool

Whether the sheet is hidden in the UI.

Hidden sheets are deliberately included in a full read: omitting them would silently drop data the caller asked for, and “fail visible” is the safer default for a data-extraction tool.

Trait Implementations§

Source§

impl Clone for Sheet

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Sheet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Sheet

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Sheet

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Sheet

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Sheet

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Sheet

Auto Trait Implementations§

§

impl Freeze for Sheet

§

impl RefUnwindSafe for Sheet

§

impl Send for Sheet

§

impl Sync for Sheet

§

impl Unpin for Sheet

§

impl UnsafeUnpin for Sheet

§

impl UnwindSafe for Sheet

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more