pub struct JsonGrammarRenderer { /* private fields */ }Expand description
Renders neutral Shape grammars for codec:json.
Implementations§
Source§impl JsonGrammarRenderer
impl JsonGrammarRenderer
Sourcepub fn new(dialect: GrammarDialect) -> Self
pub fn new(dialect: GrammarDialect) -> Self
Builds a renderer for dialect.
Sourcepub fn json_schema() -> Self
pub fn json_schema() -> Self
Builds a JSON Schema renderer.
Trait Implementations§
Source§impl Clone for JsonGrammarRenderer
impl Clone for JsonGrammarRenderer
Source§fn clone(&self) -> JsonGrammarRenderer
fn clone(&self) -> JsonGrammarRenderer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JsonGrammarRenderer
Source§impl Debug for JsonGrammarRenderer
impl Debug for JsonGrammarRenderer
impl Eq for JsonGrammarRenderer
Source§impl GrammarRenderer for JsonGrammarRenderer
impl GrammarRenderer for JsonGrammarRenderer
Source§fn codec_symbol(&self) -> Symbol
fn codec_symbol(&self) -> Symbol
Codec symbol this renderer targets.
Source§fn dialect(&self) -> GrammarDialect
fn dialect(&self) -> GrammarDialect
Concrete grammar dialect this renderer emits.
Source§fn render(
&self,
graph: &GrammarGraph,
position: GrammarPosition,
) -> Result<String>
fn render( &self, graph: &GrammarGraph, position: GrammarPosition, ) -> Result<String>
Renders
graph for this codec at position.Source§impl PartialEq for JsonGrammarRenderer
impl PartialEq for JsonGrammarRenderer
impl StructuralPartialEq for JsonGrammarRenderer
Auto Trait Implementations§
impl Freeze for JsonGrammarRenderer
impl RefUnwindSafe for JsonGrammarRenderer
impl Send for JsonGrammarRenderer
impl Sync for JsonGrammarRenderer
impl Unpin for JsonGrammarRenderer
impl UnsafeUnpin for JsonGrammarRenderer
impl UnwindSafe for JsonGrammarRenderer
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