pub enum ValueName {
Named(u64, String, ValueNameSource),
Expr(ExprID),
}
Expand description
A name of a value. Can either come from the NameID of the underlying variable, or the id of the underlying expression
Variants§
Named(u64, String, ValueNameSource)
A named value in the code with with an index to make that name locally unique
Expr(ExprID)
An un-named expression. In the resulting verilog, this is called e$id
Implementations§
Source§impl ValueName
impl ValueName
pub fn unescaped_var_name(&self) -> String
pub fn needs_escaping(&self) -> bool
pub fn var_name(&self) -> String
pub fn backward_var_name(&self) -> String
Source§impl ValueName
impl ValueName
pub fn verilog_name_source_fwd(&self) -> VerilogNameSource
pub fn verilog_name_source_back(&self) -> VerilogNameSource
pub fn _test_named(id: u64, name: String) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ValueName
impl<'de> Deserialize<'de> for ValueName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ValueName> for ValueNameSource
impl From<&ValueName> for ValueNameSource
Source§impl WithLocation for ValueName
impl WithLocation for ValueName
fn at(self, file_id: usize, span: &impl HasCodespan) -> Loc<Self>where
Self: Sized,
fn between( self, file_id: usize, start: &impl HasCodespan, end: &impl HasCodespan, ) -> Loc<Self>
fn between_locs<T, Y>(self, start: &Loc<T>, end: &Loc<Y>) -> Loc<Self>
fn nowhere(self) -> Loc<Self>where
Self: Sized,
impl Eq for ValueName
Auto Trait Implementations§
impl Freeze for ValueName
impl RefUnwindSafe for ValueName
impl Send for ValueName
impl Sync for ValueName
impl Unpin for ValueName
impl UnwindSafe for ValueName
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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