Struct leo_ast::common::array_dimensions::ArrayDimensions [−][src]
pub struct ArrayDimensions(pub Vec<PositiveNumber>);
Expand description
A vector of positive numbers that represent array dimensions.
Can be used in an array [Type
] or an array initializer [Expression
].
Implementations
Appends a vector of array dimensions to the self array dimensions.
Returns the array dimensions as strings.
Returns true
if the all array dimensions have been removed.
This method is called after repeated calls to remove_first
.
Returns the first dimension of the array.
Attempts to remove the first dimension from the array.
If the first dimension exists, then remove and return Some(PositiveNumber)
.
If the first dimension does not exist, then return None
.
Attempts to remove the last dimension from the array.
If the last dimension exists, then remove and return Some(PositiveNumber)
.
If the last dimension does not exist, then return None
.
Trait Implementations
Returns the “default value” for a type. Read more
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
Create a new ArrayDimensions
from a InputArrayDimensions
in a Leo program file.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl !RefUnwindSafe for ArrayDimensions
impl !Send for ArrayDimensions
impl !Sync for ArrayDimensions
impl Unpin for ArrayDimensions
impl UnwindSafe for ArrayDimensions
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more