pub struct BlockSchema {
pub name: String,
pub schema_type: BlockSchemaType,
pub keys: Vec<BlockSchemaKeyEntry>,
pub fields: Vec<BlockSchemaFieldEntry>,
pub random_entries: Vec<BlockSchemaRandomEntry>,
pub header_idx: Option<usize>,
pub key_idx: Option<usize>,
pub unique_together: Vec<UniqueTogetherGroup>,
}Fields§
§name: String§schema_type: BlockSchemaType§keys: Vec<BlockSchemaKeyEntry>§fields: Vec<BlockSchemaFieldEntry>§random_entries: Vec<BlockSchemaRandomEntry>§header_idx: Option<usize>Block-relative index of the line holding field NAMES rather than a record, when the schema declares one.
An INDEX rather than the line id the schema stores, because a host counts lines from the block’s corner and has no business knowing line ids. Absent for the blocks that have no header line, which is most.
key_idx: Option<usize>Block-relative index of the KEY line, on the same axis fields are
numbered on: the key COLUMN of a row schema, the key ROW of a column
schema.
Comparable with BlockSchemaFieldEntry::idx, and deliberately NOT
with BlockSchemaKeyEntry::idx, which counts along the RECORD axis —
see api::worksheet::key_index for what conflating the two cost.
None only for a random schema, which has no key axis.
unique_together: Vec<UniqueTogetherGroup>Field groups whose values must not repeat in COMBINATION — the block’s own rule, as opposed to the per-field ones on each entry.
Trait Implementations§
Source§impl Clone for BlockSchema
impl Clone for BlockSchema
Source§fn clone(&self) -> BlockSchema
fn clone(&self) -> BlockSchema
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BlockSchema
impl Debug for BlockSchema
Source§impl<'de> Deserialize<'de> for BlockSchema
impl<'de> Deserialize<'de> for BlockSchema
Source§fn deserialize<D>(
deserializer: D,
) -> Result<BlockSchema, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<BlockSchema, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl From<_GentsDummyBlockSchema> for BlockSchema
impl From<_GentsDummyBlockSchema> for BlockSchema
Source§fn from(value: _GentsDummyBlockSchema) -> BlockSchema
fn from(value: _GentsDummyBlockSchema) -> BlockSchema
Source§impl Serialize for BlockSchema
impl Serialize for BlockSchema
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 BlockSchema
impl RefUnwindSafe for BlockSchema
impl Send for BlockSchema
impl Sync for BlockSchema
impl Unpin for BlockSchema
impl UnsafeUnpin for BlockSchema
impl UnwindSafe for BlockSchema
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.