[−][src]Struct jsl::schema::Schema
An abstract representation of a JSL schema.
This struct is meant for use by validators, code generators, or other
high-level processors of schemas. For serialization and deserialization of
schemas, instead use Serde
.
Methods
impl Schema
[src]
pub fn from_serde(serde_schema: Serde) -> Result<Self, Error>
[src]
Construct a new, root schema from a Serde
.
pub fn is_root(&self) -> bool
[src]
Is this schema a root schema?
Under the hood, this is entirely equivalent to checking whether
defs().is_some()
.
pub fn definitions(&self) -> &Option<HashMap<String, Schema>>
[src]
Get the definitions associated with this schema.
If this schema is non-root, this returns None.
pub fn form(&self) -> &Form
[src]
Get the form of the schema.
Trait Implementations
impl PartialEq<Schema> for Schema
[src]
impl Clone for Schema
[src]
fn clone(&self) -> Schema
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Schema
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,