pub struct DomainRegistry { /* private fields */ }Expand description
Registry for managing multiple domains
Implementations§
Source§impl DomainRegistry
impl DomainRegistry
Sourcepub fn register_domain(
&mut self,
validator: Box<dyn DomainValidator>,
) -> Result<(), BuildError>
pub fn register_domain( &mut self, validator: Box<dyn DomainValidator>, ) -> Result<(), BuildError>
Register a domain validator
Sourcepub fn add_cross_reference(&mut self, reference: CrossReference)
pub fn add_cross_reference(&mut self, reference: CrossReference)
Add a cross-reference for later validation
Sourcepub fn register_object(
&mut self,
object: DomainObject,
) -> Result<(), BuildError>
pub fn register_object( &mut self, object: DomainObject, ) -> Result<(), BuildError>
Register an object in the global registry and appropriate domain
Sourcepub fn validate_all_references(&self) -> Vec<ReferenceValidationResult>
pub fn validate_all_references(&self) -> Vec<ReferenceValidationResult>
Validate all cross-references
Sourcepub fn validate_reference(
&self,
reference: &CrossReference,
) -> ReferenceValidationResult
pub fn validate_reference( &self, reference: &CrossReference, ) -> ReferenceValidationResult
Validate a single cross-reference
Sourcepub fn get_validation_stats(&self) -> DomainValidationStats
pub fn get_validation_stats(&self) -> DomainValidationStats
Get validation statistics
Sourcepub fn get_broken_references(&self) -> Vec<ReferenceValidationResult>
pub fn get_broken_references(&self) -> Vec<ReferenceValidationResult>
Get all broken references
Sourcepub fn get_object(&self, qualified_name: &str) -> Option<&DomainObject>
pub fn get_object(&self, qualified_name: &str) -> Option<&DomainObject>
Get object by qualified name across all domains
Sourcepub fn search_objects(&self, pattern: &str) -> Vec<&DomainObject>
pub fn search_objects(&self, pattern: &str) -> Vec<&DomainObject>
Search for objects by name pattern
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DomainRegistry
impl !RefUnwindSafe for DomainRegistry
impl !Send for DomainRegistry
impl !Sync for DomainRegistry
impl Unpin for DomainRegistry
impl !UnwindSafe for DomainRegistry
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> 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