pub struct PythonDomain { /* private fields */ }Expand description
Python domain validator for Python-specific references
Implementations§
Source§impl PythonDomain
impl PythonDomain
Sourcepub fn register_function(
&mut self,
name: String,
qualified_name: String,
signature: Option<String>,
docstring: Option<String>,
location: ReferenceLocation,
) -> Result<(), BuildError>
pub fn register_function( &mut self, name: String, qualified_name: String, signature: Option<String>, docstring: Option<String>, location: ReferenceLocation, ) -> Result<(), BuildError>
Register a Python function
Sourcepub fn register_class(
&mut self,
name: String,
qualified_name: String,
docstring: Option<String>,
location: ReferenceLocation,
) -> Result<(), BuildError>
pub fn register_class( &mut self, name: String, qualified_name: String, docstring: Option<String>, location: ReferenceLocation, ) -> Result<(), BuildError>
Register a Python class
Sourcepub fn register_module(
&mut self,
name: String,
qualified_name: String,
docstring: Option<String>,
location: ReferenceLocation,
) -> Result<(), BuildError>
pub fn register_module( &mut self, name: String, qualified_name: String, docstring: Option<String>, location: ReferenceLocation, ) -> Result<(), BuildError>
Register a Python module
Trait Implementations§
Source§impl Default for PythonDomain
impl Default for PythonDomain
Source§impl DomainValidator for PythonDomain
impl DomainValidator for PythonDomain
Source§fn domain_name(&self) -> &str
fn domain_name(&self) -> &str
Get the name of this domain
Source§fn supported_reference_types(&self) -> Vec<ReferenceType>
fn supported_reference_types(&self) -> Vec<ReferenceType>
Get the reference types this domain handles
Source§fn register_object(&mut self, object: DomainObject) -> Result<(), BuildError>
fn register_object(&mut self, object: DomainObject) -> Result<(), BuildError>
Register a domain object
Source§fn resolve_reference(&self, reference: &CrossReference) -> Option<DomainObject>
fn resolve_reference(&self, reference: &CrossReference) -> Option<DomainObject>
Resolve a reference to a domain object
Source§fn validate_reference(
&self,
reference: &CrossReference,
) -> ReferenceValidationResult
fn validate_reference( &self, reference: &CrossReference, ) -> ReferenceValidationResult
Validate a cross-reference
Source§fn get_all_objects(&self) -> Vec<&DomainObject>
fn get_all_objects(&self) -> Vec<&DomainObject>
Get all objects in this domain
Source§fn clear_objects(&mut self)
fn clear_objects(&mut self)
Clear all registered objects (for rebuilds)
Auto Trait Implementations§
impl Freeze for PythonDomain
impl RefUnwindSafe for PythonDomain
impl Send for PythonDomain
impl Sync for PythonDomain
impl Unpin for PythonDomain
impl UnwindSafe for PythonDomain
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