pub struct DrivenNet<I: Instantiable> { /* private fields */ }Expand description
Represent a net that is being driven by a Instantiable
Implementations§
Source§impl<I> DrivenNet<I>where
I: Instantiable,
impl<I> DrivenNet<I>where
I: Instantiable,
Sourcepub fn as_net_mut(&self) -> RefMut<'_, Net>
pub fn as_net_mut(&self) -> RefMut<'_, Net>
Get a mutable reference to the net being driven
Sourcepub fn is_an_input(&self) -> bool
pub fn is_an_input(&self) -> bool
Returns true if this net is a principal input
Sourcepub fn connect(&self, input: InputPort<I>)
pub fn connect(&self, input: InputPort<I>)
Connects the net driven by this output port to the given input port.
Sourcepub fn is_top_level_output(&self) -> bool
pub fn is_top_level_output(&self) -> bool
Returns true if this net is a top-level output in the netlist.
Sourcepub fn get_identifier(&self) -> Identifier
pub fn get_identifier(&self) -> Identifier
Returns a copy of the identifier of the net being driven.
Sourcepub fn expose_with_name(self, name: Identifier) -> Self
pub fn expose_with_name(self, name: Identifier) -> Self
Exposes this driven net as a top-level output with a specific port name. Multiple calls to this method can be used to create multiple output aliases for the same net.
§Panics
Panics if the weak reference to the netlist is dead.
Sourcepub fn remove_output(&self, net_name: &Identifier) -> bool
pub fn remove_output(&self, net_name: &Identifier) -> bool
Removes a specific output alias by its name from this driven net. Returns true if the output was removed, false if it didn’t exist.
§Panics
Panics if the reference to the netlist is lost.
Sourcepub fn remove_all_outputs(&self) -> usize
pub fn remove_all_outputs(&self) -> usize
Removes all output aliases for this driven net. Returns the number of outputs that were removed.
§Panics
Panics if the reference to the netlist is lost.
Sourcepub fn get_output_index(&self) -> Option<usize>
pub fn get_output_index(&self) -> Option<usize>
Returns the output position, if the net is the output of a gate.
Sourcepub fn get_instance_type(&self) -> Option<Ref<'_, I>>
pub fn get_instance_type(&self) -> Option<Ref<'_, I>>
Returns the Instantiable type driving this net, if it has a driver.
Trait Implementations§
Source§impl<I> Display for DrivenNet<I>where
I: Instantiable,
impl<I> Display for DrivenNet<I>where
I: Instantiable,
Source§impl<I> Hash for DrivenNet<I>where
I: Instantiable,
impl<I> Hash for DrivenNet<I>where
I: Instantiable,
Source§impl<I> Ord for DrivenNet<I>where
I: Instantiable,
impl<I> Ord for DrivenNet<I>where
I: Instantiable,
Source§impl<I> PartialEq for DrivenNet<I>where
I: Instantiable,
impl<I> PartialEq for DrivenNet<I>where
I: Instantiable,
Source§impl<I> PartialOrd for DrivenNet<I>where
I: Instantiable,
impl<I> PartialOrd for DrivenNet<I>where
I: Instantiable,
impl<I> Eq for DrivenNet<I>where
I: Instantiable,
Auto Trait Implementations§
impl<I> Freeze for DrivenNet<I>
impl<I> !RefUnwindSafe for DrivenNet<I>
impl<I> !Send for DrivenNet<I>
impl<I> !Sync for DrivenNet<I>
impl<I> Unpin for DrivenNet<I>
impl<I> !UnwindSafe for DrivenNet<I>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.