pub struct MetadataBuilder { /* private fields */ }Expand description
Metadata builder for tracking compilation provenance
Implementations§
Source§impl MetadataBuilder
impl MetadataBuilder
Sourcepub fn with_source_file(self, file: impl Into<String>) -> Self
pub fn with_source_file(self, file: impl Into<String>) -> Self
Set the current source file
Sourcepub fn with_rule_id(self, rule_id: impl Into<String>) -> Self
pub fn with_rule_id(self, rule_id: impl Into<String>) -> Self
Set the current rule ID
Sourcepub fn fresh_rule_id(&mut self) -> String
pub fn fresh_rule_id(&mut self) -> String
Generate a fresh rule ID
Sourcepub fn predicate_metadata(&mut self, name: &str, args: &[String]) -> Metadata
pub fn predicate_metadata(&mut self, name: &str, args: &[String]) -> Metadata
Create metadata for a predicate
Sourcepub fn logic_op_metadata(
&mut self,
op_type: &str,
operand_count: usize,
) -> Metadata
pub fn logic_op_metadata( &mut self, op_type: &str, operand_count: usize, ) -> Metadata
Create metadata for a logical operation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetadataBuilder
impl RefUnwindSafe for MetadataBuilder
impl Send for MetadataBuilder
impl Sync for MetadataBuilder
impl Unpin for MetadataBuilder
impl UnwindSafe for MetadataBuilder
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