pub struct SchemaNode(/* private fields */);
Expand description
Shared, interior-mutable representation of a JSON Schema node. Using
reference counting allows multiple parents to point to the same node which
is required to faithfully model schemas containing recursive $ref
s.
Implementations§
Source§impl SchemaNode
impl SchemaNode
pub fn new(kind: SchemaNodeKind) -> Self
pub fn bool_schema(value: bool) -> Self
pub fn any() -> Self
pub fn borrow(&self) -> Ref<'_, SchemaNodeKind>
pub fn borrow_mut(&self) -> RefMut<'_, SchemaNodeKind>
pub fn ptr_eq(&self, other: &SchemaNode) -> bool
Trait Implementations§
Source§impl Clone for SchemaNode
impl Clone for SchemaNode
Source§fn clone(&self) -> SchemaNode
fn clone(&self) -> SchemaNode
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SchemaNode
impl Debug for SchemaNode
Source§impl PartialEq for SchemaNode
impl PartialEq for SchemaNode
impl Eq for SchemaNode
Auto Trait Implementations§
impl Freeze for SchemaNode
impl !RefUnwindSafe for SchemaNode
impl !Send for SchemaNode
impl !Sync for SchemaNode
impl Unpin for SchemaNode
impl !UnwindSafe for SchemaNode
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