pub struct InstanceBuilder<'env> { /* private fields */ }Expand description
Builds an instance slot by slot, then creates it.
Slot values are passed as real CLIPS values rather than as make-instance
text, so nothing has to be escaped or re-parsed.
Implementations§
Source§impl<'env> InstanceBuilder<'env>
impl<'env> InstanceBuilder<'env>
Sourcepub fn instance_name(&mut self, slot: &str, value: &str) -> Result<&mut Self>
pub fn instance_name(&mut self, slot: &str, value: &str) -> Result<&mut Self>
Sets an instance-name slot.
Sourcepub fn fact(&mut self, slot: &str, value: &Fact<'env>) -> Result<&mut Self>
pub fn fact(&mut self, slot: &str, value: &Fact<'env>) -> Result<&mut Self>
Sets a slot to a fact address.
Sourcepub fn instance(
&mut self,
slot: &str,
value: &Instance<'env>,
) -> Result<&mut Self>
pub fn instance( &mut self, slot: &str, value: &Instance<'env>, ) -> Result<&mut Self>
Sets a slot to an instance address.
Sourcepub fn multifield(
&mut self,
slot: &str,
value: &Multifield<'env>,
) -> Result<&mut Self>
pub fn multifield( &mut self, slot: &str, value: &Multifield<'env>, ) -> Result<&mut Self>
Sets a multifield slot.
Trait Implementations§
Source§impl Drop for InstanceBuilder<'_>
impl Drop for InstanceBuilder<'_>
Auto Trait Implementations§
impl<'env> !RefUnwindSafe for InstanceBuilder<'env>
impl<'env> !Send for InstanceBuilder<'env>
impl<'env> !Sync for InstanceBuilder<'env>
impl<'env> !UnwindSafe for InstanceBuilder<'env>
impl<'env> Freeze for InstanceBuilder<'env>
impl<'env> Unpin for InstanceBuilder<'env>
impl<'env> UnsafeUnpin for InstanceBuilder<'env>
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