pub struct RstDomain { /* private fields */ }Expand description
RST domain validator for document and section references
Implementations§
Source§impl RstDomain
impl RstDomain
Sourcepub fn register_document(
&mut self,
docname: String,
title: String,
location: ReferenceLocation,
) -> Result<(), BuildError>
pub fn register_document( &mut self, docname: String, title: String, location: ReferenceLocation, ) -> Result<(), BuildError>
Register a document
Sourcepub fn register_section(
&mut self,
label: String,
title: String,
docname: String,
location: ReferenceLocation,
) -> Result<(), BuildError>
pub fn register_section( &mut self, label: String, title: String, docname: String, location: ReferenceLocation, ) -> Result<(), BuildError>
Register a section (for :ref: targets)
Sourcepub fn register_label(
&mut self,
label: String,
label_type: String,
title: Option<String>,
docname: String,
location: ReferenceLocation,
) -> Result<(), BuildError>
pub fn register_label( &mut self, label: String, label_type: String, title: Option<String>, docname: String, location: ReferenceLocation, ) -> Result<(), BuildError>
Register a figure or table label
Trait Implementations§
Source§impl DomainValidator for RstDomain
impl DomainValidator for RstDomain
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 RstDomain
impl RefUnwindSafe for RstDomain
impl Send for RstDomain
impl Sync for RstDomain
impl Unpin for RstDomain
impl UnwindSafe for RstDomain
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