Struct tract_pulse::internal::ModelBuilder[]

pub struct ModelBuilder<'a> {
    pub framework: &'a Nnef,
    pub registries: Vec<String, Global>,
    pub model: Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>,
    pub naming_scopes: Vec<String, Global>,
    pub scopes: Vec<HashMap<String, Value, RandomState>, Global>,
    pub proto_model: &'a ProtoModel,
}

Fields

framework: &'a Nnefregistries: Vec<String, Global>model: Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>naming_scopes: Vec<String, Global>scopes: Vec<HashMap<String, Value, RandomState>, Global>proto_model: &'a ProtoModel

Implementations

impl<'mb> ModelBuilder<'mb>

pub fn new(
    framework: &'mb Nnef,
    proto_model: &'mb ProtoModel
) -> ModelBuilder<'mb>

pub fn into_typed_model(
    self
) -> Result<Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, (Graph<TypedFact, Box<dyn TypedOp + 'static, Global>>, Error)>

pub fn wire_body(&mut self, body: &[Assignment]) -> Result<(), Error>

pub fn wire_invocation(
    &mut self,
    invocation: &Invocation
) -> Result<Value, Error>

pub fn wire_fragment_invocation(
    &mut self,
    invocation: &ResolvedInvocation<'_>,
    decl: &FragmentDecl,
    body: &[Assignment]
) -> Result<Value, Error>

pub fn wire(
    &mut self,
    op: impl Into<Box<dyn TypedOp + 'static, Global>>,
    inputs: &[OutletId]
) -> Result<SmallVec<[OutletId; 4]>, Error>

Auto Trait Implementations

impl<'a> !RefUnwindSafe for ModelBuilder<'a>

impl<'a> Send for ModelBuilder<'a>

impl<'a> Sync for ModelBuilder<'a>

impl<'a> Unpin for ModelBuilder<'a>

impl<'a> !UnwindSafe for ModelBuilder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.