pub struct NS<'a> {
pub name: &'a str,
pub fn_name: &'a str,
pub code: i32,
}
Expand description
The “number space” structure for identifier spaces.
Fields§
§name: &'a str
The name of this numberspace.
fn_name: &'a str
The name usable as a part of an identifier name (snake_case).
code: i32
The number space numeric code.
Implementations§
Source§impl<'a> NS<'a>
impl<'a> NS<'a>
Sourceconst fn new(name: &'a str, fn_name: &'a str, code: i32) -> NS<'a>
const fn new(name: &'a str, fn_name: &'a str, code: i32) -> NS<'a>
Create a new number space. Internal only.
Sourcepub fn base(&'a self) -> i32
pub fn base(&'a self) -> i32
Get the base of the number space. Identifiers are translated into this space by adding the base.
Auto Trait Implementations§
impl<'a> Freeze for NS<'a>
impl<'a> RefUnwindSafe for NS<'a>
impl<'a> Send for NS<'a>
impl<'a> Sync for NS<'a>
impl<'a> Unpin for NS<'a>
impl<'a> UnwindSafe for NS<'a>
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