pub struct DefinitionBuilder { /* private fields */ }Expand description
Builds a definition. build requires limits and at least one rule.
Implementations§
Source§impl DefinitionBuilder
impl DefinitionBuilder
pub fn new(name: &str, version: &str, package: &str) -> Self
pub fn input( self, name: &str, ty: TypeDecl, provenance: &[ProvenanceClass], freshness: Freshness, ) -> Self
pub fn exact(self, id: &str, args: OpArgs) -> Self
pub fn semantic(self, id: &str, decl: SemanticDecl) -> Self
pub fn on_unresolved( self, target: &str, reasons: ReasonSet, action: HandlerAction, ) -> Self
pub fn rule(self, id: &str, when: Cond, then: OutcomeDecl) -> Self
pub fn adjustment( self, id: &str, when: Cond, param: &str, scale: &[&str], ) -> Self
pub fn limits(self, limits: LimitsDecl) -> Self
pub fn build(self) -> Result<Definition, MissingLimits>
Trait Implementations§
Source§impl Clone for DefinitionBuilder
impl Clone for DefinitionBuilder
Auto Trait Implementations§
impl Freeze for DefinitionBuilder
impl RefUnwindSafe for DefinitionBuilder
impl Send for DefinitionBuilder
impl Sync for DefinitionBuilder
impl Unpin for DefinitionBuilder
impl UnsafeUnpin for DefinitionBuilder
impl UnwindSafe for DefinitionBuilder
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