pub struct ConstantBinding {
pub variable: u32,
pub value: Value,
}
Expand description
Describes variables whose possible values are given by an attribute.
Fields§
§variable: u32
The variable this binding talks about.
value: Value
The value backing this binding.
Trait Implementations§
Source§impl AsBinding for ConstantBinding
impl AsBinding for ConstantBinding
Source§fn binds(&self, variable: u32) -> Option<usize>
fn binds(&self, variable: u32) -> Option<usize>
Iff the binding has opinions about the given variable, this will
return the offset, otherwise None.
Source§fn ready_to_extend(&self, prefix: &dyn AsBinding) -> Option<u32>
fn ready_to_extend(&self, prefix: &dyn AsBinding) -> Option<u32>
Returns an optional variable by which this binding could
extend the given prefix.
Source§fn required_to_extend(
&self,
prefix: &dyn AsBinding,
target: u32,
) -> Option<Option<u32>>
fn required_to_extend( &self, prefix: &dyn AsBinding, target: u32, ) -> Option<Option<u32>>
Returns an optional variable which must be bound by the prefix
in order for this binding to extend the prefix. If None, then
this binding can never be used to extend the prefix to the
specified variable (e.g. because it doesn’t even bind it).
Source§impl Clone for ConstantBinding
impl Clone for ConstantBinding
Source§fn clone(&self) -> ConstantBinding
fn clone(&self) -> ConstantBinding
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 ConstantBinding
impl Debug for ConstantBinding
Source§impl<'de> Deserialize<'de> for ConstantBinding
impl<'de> Deserialize<'de> for ConstantBinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for ConstantBinding
impl Hash for ConstantBinding
Source§impl Ord for ConstantBinding
impl Ord for ConstantBinding
Source§fn cmp(&self, other: &ConstantBinding) -> Ordering
fn cmp(&self, other: &ConstantBinding) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ConstantBinding
impl PartialEq for ConstantBinding
Source§impl PartialOrd for ConstantBinding
impl PartialOrd for ConstantBinding
Source§impl Serialize for ConstantBinding
impl Serialize for ConstantBinding
impl Eq for ConstantBinding
impl StructuralPartialEq for ConstantBinding
Auto Trait Implementations§
impl Freeze for ConstantBinding
impl RefUnwindSafe for ConstantBinding
impl Send for ConstantBinding
impl Sync for ConstantBinding
impl Unpin for ConstantBinding
impl UnwindSafe for ConstantBinding
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