pub struct Cell { /* private fields */ }
Expand description
A cell.
Implementations§
source§impl Cell
impl Cell
sourcepub fn add_node(&mut self, name: impl Into<ArcStr>) -> SliceOne
pub fn add_node(&mut self, name: impl Into<ArcStr>) -> SliceOne
Creates a new 1-bit signal in this cell.
sourcepub fn add_bus(&mut self, name: impl Into<ArcStr>, width: usize) -> Slice
pub fn add_bus(&mut self, name: impl Into<ArcStr>, width: usize) -> Slice
Creates a new 1-dimensional bus in this cell.
sourcepub fn expose_port(&mut self, signal: impl Into<SignalId>, direction: Direction)
pub fn expose_port(&mut self, signal: impl Into<SignalId>, direction: Direction)
Exposes the given signal as a port.
If the signal is a bus, the entire bus is exposed. It is not possible to expose only a portion of a bus. Create two separate buses instead.
§Panics
Panics if the provided signal does not exist.
sourcepub fn signals(&self) -> impl Iterator<Item = (SignalId, &SignalInfo)>
pub fn signals(&self) -> impl Iterator<Item = (SignalId, &SignalInfo)>
Iterate over the signals of this cell.
sourcepub fn signal(&self, id: SignalId) -> &SignalInfo
pub fn signal(&self, id: SignalId) -> &SignalInfo
sourcepub fn try_signal(&self, id: SignalId) -> Option<&SignalInfo>
pub fn try_signal(&self, id: SignalId) -> Option<&SignalInfo>
Get the signal associated with the given ID.
sourcepub fn signal_named(&self, name: &str) -> &SignalInfo
pub fn signal_named(&self, name: &str) -> &SignalInfo
Get the signal associated with the given name.
§Panics
Panics if no signal with the given name exists.
sourcepub fn try_signal_named(&self, name: &str) -> Option<&SignalInfo>
pub fn try_signal_named(&self, name: &str) -> Option<&SignalInfo>
Get the signal associated with the given ID.
sourcepub fn instance(&self, id: InstanceId) -> &Instance
pub fn instance(&self, id: InstanceId) -> &Instance
Get the instance associated with the given ID.
§Panics
Panics if no instance with the given ID exists.
sourcepub fn try_instance(&self, id: InstanceId) -> Option<&Instance>
pub fn try_instance(&self, id: InstanceId) -> Option<&Instance>
Get the instance associated with the given ID.
sourcepub fn instance_named(&self, name: &str) -> &Instance
pub fn instance_named(&self, name: &str) -> &Instance
sourcepub fn try_instance_named(&self, name: &str) -> Option<&Instance>
pub fn try_instance_named(&self, name: &str) -> Option<&Instance>
Gets the instance with the given name.
sourcepub fn instance_from_path_element(
&self,
elem: &InstancePathElement
) -> &Instance
pub fn instance_from_path_element( &self, elem: &InstancePathElement ) -> &Instance
Gets the instance associated with the given path element.
sourcepub fn add_instance(&mut self, instance: Instance) -> InstanceId
pub fn add_instance(&mut self, instance: Instance) -> InstanceId
Add the given instance to the cell.
sourcepub fn instances(&self) -> impl Iterator<Item = (InstanceId, &Instance)>
pub fn instances(&self) -> impl Iterator<Item = (InstanceId, &Instance)>
Iterate over the instances of this cell.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Cell
impl<'de> Deserialize<'de> for Cell
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<Cell, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Cell, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Serialize for Cell
impl Serialize for Cell
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
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
source§impl<T, U> CustomHardwareType<Flipped<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Flipped<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Flipped<T>) -> U
fn from_layout_type(other: &Flipped<T>) -> U
source§impl<T, U> CustomHardwareType<InOut<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<InOut<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &InOut<T>) -> U
fn from_layout_type(other: &InOut<T>) -> U
source§impl<T, U> CustomHardwareType<Input<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Input<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Input<T>) -> U
fn from_layout_type(other: &Input<T>) -> U
source§impl<T, U> CustomHardwareType<Output<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
impl<T, U> CustomHardwareType<Output<T>> for Uwhere
U: CustomHardwareType<T>,
T: HardwareType,
source§fn from_layout_type(other: &Output<T>) -> U
fn from_layout_type(other: &Output<T>) -> U
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request