pub struct VariableIndex {
pub msb: i64,
pub lsb: i64,
}
Expand description
An index that defines the extents of a variable.
For instance, in Verilog, this is declared using [msb:lsb]
, e.g.:
reg [WIDTH-1:0] foo;
A negative lsb
usually indicates a fixed-point value where the
[msb:0]
bits (including 0) belong to the integer part and the [-1:lsb]
bits
belong to the fractional part of a number.
Fields§
§msb: i64
§lsb: i64
Trait Implementations§
Source§impl Clone for VariableIndex
impl Clone for VariableIndex
Source§fn clone(&self) -> VariableIndex
fn clone(&self) -> VariableIndex
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 Debug for VariableIndex
impl Debug for VariableIndex
Source§impl<'de> Deserialize<'de> for VariableIndex
impl<'de> Deserialize<'de> for VariableIndex
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 Display for VariableIndex
impl Display for VariableIndex
Source§impl PartialEq for VariableIndex
impl PartialEq for VariableIndex
Source§impl Serialize for VariableIndex
impl Serialize for VariableIndex
impl Copy for VariableIndex
impl Eq for VariableIndex
impl StructuralPartialEq for VariableIndex
Auto Trait Implementations§
impl Freeze for VariableIndex
impl RefUnwindSafe for VariableIndex
impl Send for VariableIndex
impl Sync for VariableIndex
impl Unpin for VariableIndex
impl UnwindSafe for VariableIndex
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