pub struct Schema {
pub name: String,
pub defs: Vec<Def>,
pub def_name_to_index: HashMap<String, usize>,
}Fields§
§name: String§defs: Vec<Def>§def_name_to_index: HashMap<String, usize>Implementations§
Source§impl Schema
impl Schema
pub fn new(name: String, defs: Vec<Def>) -> Schema
pub fn decode(name: String, bytes: &[u8]) -> Result<Schema, ()>
pub fn save_to(target: String, bytes: Vec<u8>) -> Result<()>
pub fn encode(&self) -> Vec<u8> ⓘ
pub fn def(&self, name: &str) -> Option<&Def>
pub fn skip(&self, bb: &mut ByteBuffer<'_>, type_id: i32) -> Result<(), ()>
pub fn skip_field( &self, bb: &mut ByteBuffer<'_>, field: &Field, ) -> Result<(), ()>
Trait Implementations§
impl StructuralPartialEq for Schema
Auto Trait Implementations§
impl Freeze for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnwindSafe for Schema
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