pub struct Substitution(pub HashMap<LcnfVarId, LcnfArg>);Expand description
A mapping from variable IDs to replacement arguments.
Tuple Fields§
§0: HashMap<LcnfVarId, LcnfArg>Implementations§
Source§impl Substitution
impl Substitution
pub fn new() -> Self
pub fn insert(&mut self, var: LcnfVarId, arg: LcnfArg)
pub fn get(&self, var: &LcnfVarId) -> Option<&LcnfArg>
pub fn contains(&self, var: &LcnfVarId) -> bool
pub fn compose(&self, other: &Substitution) -> Substitution
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for Substitution
impl Clone for Substitution
Source§fn clone(&self) -> Substitution
fn clone(&self) -> Substitution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Substitution
impl Debug for Substitution
Source§impl Default for Substitution
impl Default for Substitution
Source§fn default() -> Substitution
fn default() -> Substitution
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Substitution
impl RefUnwindSafe for Substitution
impl Send for Substitution
impl Sync for Substitution
impl Unpin for Substitution
impl UnsafeUnpin for Substitution
impl UnwindSafe for Substitution
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