pub struct SkiffFormat { /* private fields */ }Expand description
A YTsaurus <...>skiff format declaration.
Implementations§
Source§impl Format
impl Format
Sourcepub fn new(table_schemas: Vec<SchemaRef>) -> Result<Format, SchemaError>
pub fn new(table_schemas: Vec<SchemaRef>) -> Result<Format, SchemaError>
Builds a Skiff format with inline table schemas only.
Use Format::from_parts when a table schema refers to the registry.
Sourcepub fn from_parts(
table_schemas: Vec<SchemaRef>,
schema_registry: BTreeMap<String, Schema>,
) -> Result<Format, SchemaError>
pub fn from_parts( table_schemas: Vec<SchemaRef>, schema_registry: BTreeMap<String, Schema>, ) -> Result<Format, SchemaError>
Builds a Skiff format and validates its table schemas and registry.
Sourcepub fn table_schemas(&self) -> &[SchemaRef]
pub fn table_schemas(&self) -> &[SchemaRef]
Schemas in table-index order.
Sourcepub fn schema_registry(&self) -> &BTreeMap<String, Schema>
pub fn schema_registry(&self) -> &BTreeMap<String, Schema>
Schemas shared by one or more SchemaRef::Registry values.
Sourcepub fn table_schema(&self, index: usize) -> Result<&Schema, SchemaError>
pub fn table_schema(&self, index: usize) -> Result<&Schema, SchemaError>
Resolves the schema for table index.
Sourcepub fn validate(&self) -> Result<(), SchemaError>
pub fn validate(&self) -> Result<(), SchemaError>
Validates all format references and schema trees.
Trait Implementations§
impl Eq for Format
impl StructuralPartialEq for Format
Auto Trait Implementations§
impl Freeze for Format
impl RefUnwindSafe for Format
impl Send for Format
impl Sync for Format
impl Unpin for Format
impl UnsafeUnpin for Format
impl UnwindSafe for Format
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
Mutably borrows from an owned value. Read more