Skip to main content

BlockInfo

Struct BlockInfo 

Source
pub struct BlockInfo {
Show 17 fields pub sheet_idx: usize, pub sheet_id: u16, pub block_id: usize, pub row_start: usize, pub row_cnt: usize, pub col_start: usize, pub col_cnt: usize, pub schema: Option<BlockSchema>, pub field_renders: Vec<FieldRenderEntry>, pub cells: Vec<BlockCellInfo>, pub description: String, pub owner: String, pub modify_policy: ModifyPolicy, pub permissions: BlockPermissions, pub analyzes: Option<usize>, pub analyzed_by: Vec<usize>, pub pivot: Option<PivotSpecParts>,
}

Fields§

§sheet_idx: usize§sheet_id: u16§block_id: usize§row_start: usize

0-based sheet row of the block’s top-left cell.

§row_cnt: usize§col_start: usize

0-based sheet column of the block’s top-left cell.

§col_cnt: usize§schema: Option<BlockSchema>§field_renders: Vec<FieldRenderEntry>§cells: Vec<BlockCellInfo>§description: String

What the block is for, in prose — empty when nobody said. The schema describes the shape of the records; this is the only thing that says what they mean, which is what an AI reading the sheet needs.

§owner: String

The craft that created the block, empty for one the user made.

§modify_policy: ModifyPolicy

The block’s default write policy.

§permissions: BlockPermissions

Per-operation overrides of it. Do not read these apart to decide whether an edit is allowed — ask Workbook::may_modify_block, so every host answers the question the same way.

§analyzes: Option<usize>

Which block this one ANALYSES, when it is an analysis block — a total row, a set of statistics, later a pivot. None for an ordinary block.

Reported in both directions on purpose. An agent reading the sheet has to be able to tell a table from its analysis: the rows of an analysis block are its own records, not the source’s, and summing them alongside the source would double-count. See design/block-analysis.md.

§analyzed_by: Vec<usize>

The blocks that analyse THIS one. Empty for a block nobody summarises.

§pivot: Option<PivotSpecParts>

When this analysis block is a PIVOT, the recipe it derives from. None for a total row and for an ordinary block.

Reported because a pivot’s SHAPE is data, so a reader has to know it is looking at one: a stale pivot’s numbers are each correct while a whole group is simply absent, which is the one way a block can mislead without being wrong. See design/block-pivot.md §8.

Trait Implementations§

Source§

impl Clone for BlockInfo

Source§

fn clone(&self) -> BlockInfo

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 BlockInfo

Source§

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

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

impl<'de> Deserialize<'de> for BlockInfo

Source§

fn deserialize<D>( deserializer: D, ) -> Result<BlockInfo, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

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

impl From<_GentsDummyBlockInfo> for BlockInfo

Source§

fn from(value: _GentsDummyBlockInfo) -> BlockInfo

Converts to this type from the input type.
Source§

impl Serialize for BlockInfo

Source§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

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

impl TS for BlockInfo

Source§

fn _register(manager: &mut DescriptorManager, generic_base: bool) -> usize

Source§

fn _ts_name() -> String

Source§

fn _is_optional() -> bool

Source§

fn _tag() -> Option<&'static str>

Auto Trait Implementations§

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
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<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

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