[][src]Struct dragnit::Schema

pub struct Schema {
    pub name: String,
    pub defs: Vec<Def>,
    pub def_name_to_index: HashMap<String, usize>,
}

Fields

name: Stringdefs: Vec<Def>def_name_to_index: HashMap<String, usize>

Methods

impl Schema[src]

pub fn new(name: String, defs: Vec<Def>) -> Schema[src]

pub fn decode(name: String, bytes: &[u8]) -> Result<Schema, ()>[src]

pub fn save_to(target: String, bytes: Vec<u8>) -> Result<()>[src]

pub fn encode(&self) -> Vec<u8>[src]

pub fn def(&self, name: &str) -> Option<&Def>[src]

pub fn skip(&self, bb: &mut ByteBuffer, type_id: i32) -> Result<(), ()>[src]

pub fn skip_field(&self, bb: &mut ByteBuffer, field: &Field) -> Result<(), ()>[src]

Trait Implementations

impl PartialEq<Schema> for Schema[src]

impl Debug for Schema[src]

impl StructuralPartialEq for Schema[src]

Auto Trait Implementations

impl Send for Schema

impl Sync for Schema

impl Unpin for Schema

impl UnwindSafe for Schema

impl RefUnwindSafe for Schema

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]