pub enum StaticControl {
Repeat(StaticRepeat),
Enable(StaticEnable),
Par(StaticPar),
Seq(StaticSeq),
If(StaticIf),
Empty(Empty),
Invoke(StaticInvoke),
}
Expand description
Control AST nodes.
Variants§
Repeat(StaticRepeat)
Enable(StaticEnable)
Par(StaticPar)
Seq(StaticSeq)
If(StaticIf)
Empty(Empty)
Invoke(StaticInvoke)
Implementations§
Source§impl StaticControl
impl StaticControl
Sourcepub fn seq(stmts: Vec<StaticControl>, latency: u64) -> Self
pub fn seq(stmts: Vec<StaticControl>, latency: u64) -> Self
Convience constructor for static enable.
Sourcepub fn par(stmts: Vec<StaticControl>, latency: u64) -> Self
pub fn par(stmts: Vec<StaticControl>, latency: u64) -> Self
Convience constructor for static enable.
Sourcepub fn static_if(
port: RRC<Port>,
tbranch: Box<StaticControl>,
fbranch: Box<StaticControl>,
latency: u64,
) -> Self
pub fn static_if( port: RRC<Port>, tbranch: Box<StaticControl>, fbranch: Box<StaticControl>, latency: u64, ) -> Self
Convience constructor for static if
Sourcepub fn repeat(num_repeats: u64, latency: u64, body: Box<StaticControl>) -> Self
pub fn repeat(num_repeats: u64, latency: u64, body: Box<StaticControl>) -> Self
Convience constructor for static if
Sourcepub fn get_attribute(&self, attr: Attribute) -> Option<u64>
pub fn get_attribute(&self, attr: Attribute) -> Option<u64>
Returns the value of an attribute if present
Sourcepub fn get_latency(&self) -> u64
pub fn get_latency(&self) -> u64
Returns the value of an attribute if present
Sourcepub fn take_static_control(&mut self) -> StaticControl
pub fn take_static_control(&mut self) -> StaticControl
Replaces &mut self with an empty static control statement, and returns self
Trait Implementations§
Source§impl Debug for StaticControl
impl Debug for StaticControl
Source§impl<'a> From<&'a StaticControl> for GenericControl<'a>
impl<'a> From<&'a StaticControl> for GenericControl<'a>
Source§fn from(sc: &'a StaticControl) -> Self
fn from(sc: &'a StaticControl) -> Self
Converts to this type from the input type.
Source§impl From<Rc<RefCell<StaticGroup>>> for StaticControl
impl From<Rc<RefCell<StaticGroup>>> for StaticControl
Source§fn from(sgroup: RRC<StaticGroup>) -> Self
fn from(sgroup: RRC<StaticGroup>) -> Self
Converts to this type from the input type.
Source§impl From<StaticControl> for Control
impl From<StaticControl> for Control
Source§fn from(sc: StaticControl) -> Self
fn from(sc: StaticControl) -> Self
Converts to this type from the input type.
Source§impl From<StaticEnable> for StaticControl
impl From<StaticEnable> for StaticControl
Source§fn from(se: StaticEnable) -> Self
fn from(se: StaticEnable) -> Self
Converts to this type from the input type.
Source§impl GetAttributes for StaticControl
impl GetAttributes for StaticControl
Source§fn get_mut_attributes(&mut self) -> &mut Attributes
fn get_mut_attributes(&mut self) -> &mut Attributes
Returns a mutable
Attributes
instanceSource§fn get_attributes(&self) -> &Attributes
fn get_attributes(&self) -> &Attributes
Returns an
Attributes
instanceAuto Trait Implementations§
impl Freeze for StaticControl
impl !RefUnwindSafe for StaticControl
impl !Send for StaticControl
impl !Sync for StaticControl
impl Unpin for StaticControl
impl !UnwindSafe for StaticControl
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> 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