pub struct Instance {
pub kind: String,
pub params: BTreeMap<String, ParamValue>,
pub inputs: BTreeMap<String, Value>,
pub outputs: BTreeMap<String, Range<usize>>,
pub ios: BTreeMap<String, IoValue>,
}
Fields§
§kind: String
§params: BTreeMap<String, ParamValue>
§inputs: BTreeMap<String, Value>
§outputs: BTreeMap<String, Range<usize>>
§ios: BTreeMap<String, IoValue>
Implementations§
Source§impl Instance
impl Instance
pub fn new(kind: impl Into<String>) -> Self
pub fn output_len(&self) -> usize
pub fn get_param_string(&self, name: &str) -> Option<&str>
pub fn add_param( &mut self, name: impl Into<String>, value: impl Into<ParamValue>, )
pub fn rename_param( &mut self, name_from: impl AsRef<str>, name_to: impl Into<String>, )
pub fn rename_input( &mut self, name_from: impl AsRef<str>, name_to: impl Into<String>, )
pub fn rename_output( &mut self, name_from: impl AsRef<str>, name_to: impl Into<String>, )
pub fn rename_io( &mut self, name_from: impl AsRef<str>, name_to: impl Into<String>, )
pub fn visit(&self, f: impl FnMut(Net))
pub fn visit_mut(&mut self, f: impl FnMut(&mut Net))
Trait Implementations§
impl Eq for Instance
impl StructuralPartialEq for Instance
Auto Trait Implementations§
impl Freeze for Instance
impl RefUnwindSafe for Instance
impl Send for Instance
impl Sync for Instance
impl Unpin for Instance
impl UnwindSafe for Instance
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.