pub struct Variable {
pub kind: VariableKind,
pub item: Item,
}
Fields§
§kind: VariableKind
§item: Item
Implementations§
Source§impl Variable
impl Variable
Sourcepub fn is_immutable(&self) -> bool
pub fn is_immutable(&self) -> bool
Whether a variable is always immutable. Used for optimizations to determine whether it’s safe to inline/merge
pub fn has_length(&self) -> bool
pub fn has_buffer_length(&self) -> bool
Sourcepub fn is_constant(&self, value: i64) -> bool
pub fn is_constant(&self, value: i64) -> bool
Determines if the value is a constant with the specified value (converted if necessary)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Variable
impl<'de> Deserialize<'de> for Variable
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 From<ExpandElement> for Variable
impl From<ExpandElement> for Variable
Source§fn from(value: ExpandElement) -> Self
fn from(value: ExpandElement) -> Self
Converts to this type from the input type.
Source§impl FromArgList for Variable
impl FromArgList for Variable
Source§fn from_arg_list(args: &mut VecDeque<Variable>) -> Self
fn from_arg_list(args: &mut VecDeque<Variable>) -> Self
Creates this type from a list of variables. This works like a parse stream, where consumed
variables are popped from the front.
Source§fn as_arg_list(&self) -> impl IntoIterator<Item = Variable>
fn as_arg_list(&self) -> impl IntoIterator<Item = Variable>
Turns this type into a list of
Variable
s.Source§impl OperationArgs for Variable
impl OperationArgs for Variable
impl Copy for Variable
impl Eq for Variable
impl StructuralPartialEq for Variable
Auto Trait Implementations§
impl Freeze for Variable
impl RefUnwindSafe for Variable
impl Send for Variable
impl Sync for Variable
impl Unpin for Variable
impl UnwindSafe for Variable
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.