Struct calyx_frontend::Attributes
source · pub struct Attributes { /* private fields */ }
Expand description
Attributes associated with a specific IR structure.
Implementations§
source§impl Attributes
impl Attributes
sourcepub fn get<A>(&self, key: A) -> Option<u64>where
A: Into<Attribute>,
pub fn get<A>(&self, key: A) -> Option<u64>where A: Into<Attribute>,
Get the value associated with an attribute key
sourcepub fn has<A>(&self, key: A) -> boolwhere
A: Into<Attribute>,
pub fn has<A>(&self, key: A) -> boolwhere A: Into<Attribute>,
Check if an attribute key has been set
sourcepub fn remove<A>(&mut self, key: A)where
A: Into<Attribute>,
pub fn remove<A>(&mut self, key: A)where A: Into<Attribute>,
Remove attribute with the name key
pub fn to_string_with<F>(&self, sep: &'static str, fmt: F) -> Stringwhere F: Fn(String, u64) -> String,
Trait Implementations§
source§impl Clone for Attributes
impl Clone for Attributes
source§fn clone(&self) -> Attributes
fn clone(&self) -> Attributes
Returns a copy 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 Attributes
impl Debug for Attributes
source§impl Default for Attributes
impl Default for Attributes
source§fn default() -> Attributes
fn default() -> Attributes
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Attributes
impl Send for Attributes
impl Sync for Attributes
impl Unpin for Attributes
impl UnwindSafe for Attributes
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