Struct calyx_ir::LibrarySignatures
source · pub struct LibrarySignatures { /* private fields */ }
Expand description
A representation of all the primitive definitions found while parsing the root program.
Implementations§
source§impl LibrarySignatures
impl LibrarySignatures
sourcepub fn find_primitive<S>(&self, name: S) -> Option<&Primitive>where
S: Into<Id>,
pub fn find_primitive<S>(&self, name: S) -> Option<&Primitive>where S: Into<Id>,
Return the Primitive associated with the given name if defined, otherwise return None.
sourcepub fn get_primitive<S>(&self, name: S) -> &Primitivewhere
S: Into<Id>,
pub fn get_primitive<S>(&self, name: S) -> &Primitivewhere S: Into<Id>,
Return the Primitive associated to this Id.
sourcepub fn signatures(&self) -> impl Iterator<Item = &Primitive> + '_
pub fn signatures(&self) -> impl Iterator<Item = &Primitive> + '_
Return an iterator over all defined primitives.
sourcepub fn externs(self) -> Vec<(PathBuf, LinkedHashMap<Id, Primitive>)>
pub fn externs(self) -> Vec<(PathBuf, LinkedHashMap<Id, Primitive>)>
Return the underlying externs
pub fn all_prims(&self) -> Vec<(Option<PathBuf>, &LinkedHashMap<Id, Primitive>)>
sourcepub fn prim_inlines(&self) -> impl Iterator<Item = &Primitive> + '_
pub fn prim_inlines(&self) -> impl Iterator<Item = &Primitive> + '_
Return the underyling inlined primitives
sourcepub fn extern_paths(&self) -> Vec<&PathBuf>
pub fn extern_paths(&self) -> Vec<&PathBuf>
Return the paths for the extern defining files
Trait Implementations§
source§impl Debug for LibrarySignatures
impl Debug for LibrarySignatures
source§impl Default for LibrarySignatures
impl Default for LibrarySignatures
source§fn default() -> LibrarySignatures
fn default() -> LibrarySignatures
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for LibrarySignatures
impl Send for LibrarySignatures
impl Sync for LibrarySignatures
impl Unpin for LibrarySignatures
impl UnwindSafe for LibrarySignatures
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