pub struct Model(/* private fields */);
Trait Implementations§
Source§impl ModelInterface for Model
impl ModelInterface for Model
type Fact = Fact
type Runnable = Runnable
type Value = Value
fn input_count(&self) -> Result<usize>
fn output_count(&self) -> Result<usize>
fn input_name(&self, id: usize) -> Result<String>
fn output_name(&self, id: usize) -> Result<String>
fn set_output_names( &mut self, outputs: impl IntoIterator<Item = impl AsRef<str>>, ) -> Result<()>
fn input_fact(&self, id: usize) -> Result<Fact>
fn output_fact(&self, id: usize) -> Result<Fact>
fn declutter(&mut self) -> Result<()>
fn optimize(&mut self) -> Result<()>
fn into_decluttered(self) -> Result<Model>
fn into_optimized(self) -> Result<Model>
fn into_runnable(self) -> Result<Runnable>
fn concretize_symbols( &mut self, values: impl IntoIterator<Item = (impl AsRef<str>, i64)>, ) -> Result<()>
fn transform(&mut self, transform: &str) -> Result<()>
fn pulse(&mut self, name: impl AsRef<str>, value: impl AsRef<str>) -> Result<()>
fn cost_json(&self) -> Result<String>
fn profile_json<I, IV, IE, S, SV, SE>( &self, inputs: Option<I>, state_initializers: Option<S>, ) -> Result<String>
fn property_keys(&self) -> Result<Vec<String>>
fn property(&self, name: impl AsRef<str>) -> Result<Value>
Auto Trait Implementations§
impl Freeze for Model
impl !RefUnwindSafe for Model
impl Send for Model
impl Sync for Model
impl Unpin for Model
impl !UnwindSafe for Model
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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