pub struct Declarations(/* private fields */);Expand description
A structure used to track declared variables.
Implementations§
Source§impl Declarations
impl Declarations
pub fn new() -> Declarations
pub fn add_declaration(&mut self, declaration: &Declaration)
pub fn get_declaration(&self, name: &VariableName) -> Option<&Declaration>
pub fn get_type(&self, name: &VariableName) -> Option<&VariableType>
pub fn iter(&self) -> impl Iterator<Item = (&VariableName, &Declaration)>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for Declarations
impl Clone for Declarations
Source§fn clone(&self) -> Declarations
fn clone(&self) -> Declarations
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 Default for Declarations
impl Default for Declarations
Source§fn default() -> Declarations
fn default() -> Declarations
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Declarations
impl RefUnwindSafe for Declarations
impl Send for Declarations
impl Sync for Declarations
impl Unpin for Declarations
impl UnwindSafe for Declarations
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