[−][src]Trait flatdata::ArchiveBuilder
A flatdata archive builder for serializing data.
For each archive in generated code there is a corresponding archive builder which implements this trait.
Associated Constants
const NAME: &'static str
Name of the archive associated with this archive builder.
const SCHEMA: &'static str
Schema of the archive associated with this archive builder.
Used only for debug and inspection purposes.
Required methods
fn new(storage: Rc<dyn ResourceStorage>) -> Result<Self, ResourceStorageError>
Creates an archive with name NAME
and schema SCHEMA
in the given
storage for writing.
If the archive is successfully created, the storage will contain the archive and archives schema. Archive's resources need to be written separately by using the corresponding generated methods:
set_struct
set_vector
start_vector
/finish_vector
start_multivector
/finish_multivector
.
For more information about how to write resources, cf. the coappearances example.