pub enum ControlNet {
Pos(ValueBit),
Neg(ValueBit),
}Expand description
A control net is a [Net] that can be negated.
Variants§
Implementations§
Source§impl ControlNet
impl ControlNet
pub const UNDEF: ControlNet
pub const ZERO: ControlNet
pub const ONE: ControlNet
pub fn from_net_invert(net: ValueBit, invert: bool) -> Self
pub fn net(self) -> ValueBit
pub fn is_positive(self) -> bool
pub fn is_negative(self) -> bool
pub fn is_active(self) -> Option<bool>
pub fn is_always(self, active: bool) -> bool
pub fn is_const(self) -> bool
pub fn canonicalize(self) -> Self
pub fn into_pos(self, design: &Design) -> ValueBit
pub fn into_neg(self, design: &Design) -> ValueBit
pub fn visit(self, f: impl FnMut(ValueBit))
pub fn visit_mut(&mut self, f: impl FnMut(&mut ValueBit))
Trait Implementations§
Source§impl Clone for ControlNet
impl Clone for ControlNet
impl Copy for ControlNet
Source§impl Debug for ControlNet
impl Debug for ControlNet
Source§impl Display for ControlNet
impl Display for ControlNet
impl Eq for ControlNet
Source§impl From<ControlNet> for RewriteResult
impl From<ControlNet> for RewriteResult
Source§fn from(cnet: ControlNet) -> Self
fn from(cnet: ControlNet) -> Self
Converts to this type from the input type.
Source§impl From<ValueBit> for ControlNet
impl From<ValueBit> for ControlNet
Source§impl Hash for ControlNet
impl Hash for ControlNet
Source§impl Not for ControlNet
impl Not for ControlNet
Source§impl Ord for ControlNet
impl Ord for ControlNet
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ControlNet
impl PartialEq for ControlNet
Source§impl PartialOrd for ControlNet
impl PartialOrd for ControlNet
impl StructuralPartialEq for ControlNet
Auto Trait Implementations§
impl Freeze for ControlNet
impl RefUnwindSafe for ControlNet
impl Send for ControlNet
impl Sync for ControlNet
impl Unpin for ControlNet
impl UnsafeUnpin for ControlNet
impl UnwindSafe for ControlNet
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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.