pub enum WitnessOrHole {
Witness,
TypedHole(Arc<str>),
}Expand description
For named construct nodes, we abuse the witness combinator to support typed holes.
We do this because witness nodes have free source and target arrows, and
allow us to store arbitrary data in them using the generic witness type of
the node. Holes are characterized entirely by their source and target type,
just like witnesses, and are labelled by their name.
Variants§
Witness
This witness is an actual witness combinator (with no witness data attached, that comes later)
TypedHole(Arc<str>)
This is a typed hole, with the given name.
Implementations§
Source§impl WitnessOrHole
impl WitnessOrHole
pub fn shallow_clone(&self) -> Self
Trait Implementations§
Source§impl Clone for WitnessOrHole
impl Clone for WitnessOrHole
Source§fn clone(&self) -> WitnessOrHole
fn clone(&self) -> WitnessOrHole
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 Debug for WitnessOrHole
impl Debug for WitnessOrHole
Source§impl From<&NoWitness> for WitnessOrHole
impl From<&NoWitness> for WitnessOrHole
Source§impl Hash for WitnessOrHole
impl Hash for WitnessOrHole
Source§impl PartialEq for WitnessOrHole
impl PartialEq for WitnessOrHole
impl Eq for WitnessOrHole
impl StructuralPartialEq for WitnessOrHole
Auto Trait Implementations§
impl Freeze for WitnessOrHole
impl RefUnwindSafe for WitnessOrHole
impl Send for WitnessOrHole
impl Sync for WitnessOrHole
impl Unpin for WitnessOrHole
impl UnwindSafe for WitnessOrHole
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