pub struct SchemaAssociations<E: Environment> { /* private fields */ }
Implementations§
Source§impl<E: Environment> SchemaAssociations<E>
impl<E: Environment> SchemaAssociations<E>
pub fn add(&self, rule: AssociationRule, assoc: SchemaAssociation)
pub fn read( &self, ) -> RwLockReadGuard<'_, Vec<(AssociationRule, SchemaAssociation)>>
pub fn clear(&self)
pub async fn add_from_schemastore( &self, url: &Option<Url>, base: &Option<Url>, ) -> Result<(), Error>
Sourcepub fn add_from_document(&self, doc_url: &Url, node: &Node)
pub fn add_from_document(&self, doc_url: &Url, node: &Node)
Adds the schema from a @jsonaschema
annotation in the root.
pub fn get_schema_url(&self, schema_ref: &str) -> Option<Url>
pub fn schema_key_complete_schema(&self) -> Schema
pub fn query_for(&self, file: &Url) -> Option<Arc<SchemaAssociation>>
Trait Implementations§
Source§impl<E: Clone + Environment> Clone for SchemaAssociations<E>
impl<E: Clone + Environment> Clone for SchemaAssociations<E>
Source§fn clone(&self) -> SchemaAssociations<E>
fn clone(&self) -> SchemaAssociations<E>
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 moreAuto Trait Implementations§
impl<E> Freeze for SchemaAssociations<E>where
E: Freeze,
impl<E> !RefUnwindSafe for SchemaAssociations<E>
impl<E> Send for SchemaAssociations<E>
impl<E> Sync for SchemaAssociations<E>
impl<E> Unpin for SchemaAssociations<E>where
E: Unpin,
impl<E> !UnwindSafe for SchemaAssociations<E>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more