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: usize0-based sheet row of the block’s top-left cell.
row_cnt: usize§col_start: usize0-based sheet column of the block’s top-left cell.
col_cnt: usize§schema: Option<BlockSchema>§field_renders: Vec<FieldRenderEntry>§cells: Vec<BlockCellInfo>§description: StringWhat 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: StringThe craft that created the block, empty for one the user made.
modify_policy: ModifyPolicyThe block’s default write policy.
permissions: BlockPermissionsPer-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<'de> Deserialize<'de> for BlockInfo
impl<'de> Deserialize<'de> for BlockInfo
Source§fn deserialize<D>(
deserializer: D,
) -> Result<BlockInfo, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<BlockInfo, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Serialize for BlockInfo
impl Serialize for BlockInfo
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Auto Trait Implementations§
impl Freeze for BlockInfo
impl RefUnwindSafe for BlockInfo
impl Send for BlockInfo
impl Sync for BlockInfo
impl Unpin for BlockInfo
impl UnsafeUnpin for BlockInfo
impl UnwindSafe for BlockInfo
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreimpl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.