pub struct VariableMeta<VarId, ScopeId> {
pub var: VariableRef<VarId, ScopeId>,
pub num_bits: Option<u32>,
pub variable_type: Option<VariableType>,
pub variable_type_name: Option<String>,
pub index: Option<VariableIndex>,
pub direction: Option<VariableDirection>,
pub enum_map: HashMap<String, String>,
pub encoding: VariableEncoding,
}
Fields§
§var: VariableRef<VarId, ScopeId>
§num_bits: Option<u32>
§variable_type: Option<VariableType>
Type of the variable in the HDL (on a best effort basis).
variable_type_name: Option<String>
Type name of variable, if available
index: Option<VariableIndex>
§direction: Option<VariableDirection>
§enum_map: HashMap<String, String>
§encoding: VariableEncoding
Indicates how the variable is stored. A variable of “type” boolean for example could be stored as a String or as a BitVector.
Implementations§
Source§impl<VarId1, ScopeId1> VariableMeta<VarId1, ScopeId1>
impl<VarId1, ScopeId1> VariableMeta<VarId1, ScopeId1>
pub fn map_ids<VarId2, ScopeId2>( self, var_fn: impl FnMut(VarId1) -> VarId2, scope_fn: impl FnMut(ScopeId1) -> ScopeId2, ) -> VariableMeta<VarId2, ScopeId2>
Trait Implementations§
Source§impl<VarId: Clone, ScopeId: Clone> Clone for VariableMeta<VarId, ScopeId>
impl<VarId: Clone, ScopeId: Clone> Clone for VariableMeta<VarId, ScopeId>
Source§fn clone(&self) -> VariableMeta<VarId, ScopeId>
fn clone(&self) -> VariableMeta<VarId, ScopeId>
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<'de, VarId, ScopeId> Deserialize<'de> for VariableMeta<VarId, ScopeId>where
VarId: Deserialize<'de>,
ScopeId: Deserialize<'de>,
impl<'de, VarId, ScopeId> Deserialize<'de> for VariableMeta<VarId, ScopeId>where
VarId: Deserialize<'de>,
ScopeId: Deserialize<'de>,
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<VarId, ScopeId> FromBytesOwned for VariableMeta<VarId, ScopeId>where
Json<Self>: FromBytesOwned,
impl<VarId, ScopeId> FromBytesOwned for VariableMeta<VarId, ScopeId>where
Json<Self>: FromBytesOwned,
Source§impl<VarId, ScopeId> Serialize for VariableMeta<VarId, ScopeId>
impl<VarId, ScopeId> Serialize for VariableMeta<VarId, ScopeId>
Source§impl<'__to_bytes_a, VarId, ScopeId> ToBytes<'__to_bytes_a> for VariableMeta<VarId, ScopeId>
impl<'__to_bytes_a, VarId, ScopeId> ToBytes<'__to_bytes_a> for VariableMeta<VarId, ScopeId>
Auto Trait Implementations§
impl<VarId, ScopeId> Freeze for VariableMeta<VarId, ScopeId>
impl<VarId, ScopeId> RefUnwindSafe for VariableMeta<VarId, ScopeId>where
VarId: RefUnwindSafe,
ScopeId: RefUnwindSafe,
impl<VarId, ScopeId> Send for VariableMeta<VarId, ScopeId>
impl<VarId, ScopeId> Sync for VariableMeta<VarId, ScopeId>
impl<VarId, ScopeId> Unpin for VariableMeta<VarId, ScopeId>
impl<VarId, ScopeId> UnwindSafe for VariableMeta<VarId, ScopeId>where
VarId: UnwindSafe,
ScopeId: UnwindSafe,
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