pub struct Parser { /* private fields */ }Implementations§
Source§impl Parser
impl Parser
pub fn new(tokens: Vec<Token>) -> Self
pub fn with_base_path(self, path: &Path) -> Self
pub fn parse(&mut self) -> Result<IndexMap<String, Value>>
pub fn into_schemas(self) -> IndexMap<String, Schema>
pub fn into_unions(self) -> IndexMap<String, Union>
Sourcepub fn into_schemas_and_unions(
self,
) -> (IndexMap<String, Schema>, IndexMap<String, Union>)
pub fn into_schemas_and_unions( self, ) -> (IndexMap<String, Schema>, IndexMap<String, Union>)
Consume the parser and return both schemas and unions.
Sourcepub fn is_root_array(&self) -> bool
pub fn is_root_array(&self) -> bool
Check if the @root-array directive was present
Auto Trait Implementations§
impl Freeze for Parser
impl RefUnwindSafe for Parser
impl Send for Parser
impl Sync for Parser
impl Unpin for Parser
impl UnwindSafe for Parser
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