pub struct PeriodicColumn {
pub span: SourceSpan,
pub name: Identifier,
pub values: Vec<u64>,
}Expand description
Declaration of a periodic column in an AirScript module.
Periodic columns are columns with repeating cycles of values. The values declared for the periodic column should be the cycle of values that will be repeated. The length of the values vector is expected to be a power of 2 with a minimum length of 2, which is enforced during semantic analysis.
Fields§
§span: SourceSpan§name: Identifier§values: Vec<u64>Implementations§
Source§impl PeriodicColumn
impl PeriodicColumn
pub const fn new(span: SourceSpan, name: Identifier, values: Vec<u64>) -> Self
pub fn period(&self) -> usize
Trait Implementations§
Source§impl Clone for PeriodicColumn
impl Clone for PeriodicColumn
Source§fn clone(&self) -> PeriodicColumn
fn clone(&self) -> PeriodicColumn
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 PeriodicColumn
impl Debug for PeriodicColumn
Source§impl PartialEq for PeriodicColumn
impl PartialEq for PeriodicColumn
Source§impl Spanned for PeriodicColumn
impl Spanned for PeriodicColumn
fn span(&self) -> SourceSpan
impl Eq for PeriodicColumn
Auto Trait Implementations§
impl Freeze for PeriodicColumn
impl RefUnwindSafe for PeriodicColumn
impl Send for PeriodicColumn
impl Sync for PeriodicColumn
impl Unpin for PeriodicColumn
impl UnwindSafe for PeriodicColumn
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more