pub struct GenericActions<Head: Clone + Display, Leaf: Clone + PartialEq + Eq + Display + Hash>(pub Vec<GenericAction<Head, Leaf>>);Tuple Fields§
§0: Vec<GenericAction<Head, Leaf>>Implementations§
Source§impl<Head, Leaf> GenericActions<Head, Leaf>
impl<Head, Leaf> GenericActions<Head, Leaf>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl Iterator<Item = &GenericAction<Head, Leaf>>
pub fn visit_vars(&self, f: &mut impl FnMut(&Span, &Leaf))
Sourcepub fn visit_exprs(
self,
f: &mut impl FnMut(GenericExpr<Head, Leaf>) -> GenericExpr<Head, Leaf>,
) -> Self
pub fn visit_exprs( self, f: &mut impl FnMut(GenericExpr<Head, Leaf>) -> GenericExpr<Head, Leaf>, ) -> Self
Transforms every expression appearing in the action list using f.
Sourcepub fn visit_actions(
self,
f: &mut impl FnMut(GenericAction<Head, Leaf>) -> GenericAction<Head, Leaf>,
) -> Self
pub fn visit_actions( self, f: &mut impl FnMut(GenericAction<Head, Leaf>) -> GenericAction<Head, Leaf>, ) -> Self
Rewrites each action in the collection with the provided closure.
pub fn new(actions: Vec<GenericAction<Head, Leaf>>) -> Self
pub fn singleton(action: GenericAction<Head, Leaf>) -> Self
Sourcepub fn map_symbols<Head2, Leaf2>(
self,
head: &mut impl FnMut(Head) -> Head2,
leaf: &mut impl FnMut(Leaf) -> Leaf2,
) -> GenericActions<Head2, Leaf2>
pub fn map_symbols<Head2, Leaf2>( self, head: &mut impl FnMut(Head) -> Head2, leaf: &mut impl FnMut(Leaf) -> Leaf2, ) -> GenericActions<Head2, Leaf2>
Applies the provided head and leaf mappings to each action.
Sourcepub fn make_unresolved(self) -> GenericActions<String, String>
pub fn make_unresolved(self) -> GenericActions<String, String>
Converts the actions into their unresolved representation by formatting heads and leaves.
Trait Implementations§
Source§impl<Head: Clone + Clone + Display, Leaf: Clone + Clone + PartialEq + Eq + Display + Hash> Clone for GenericActions<Head, Leaf>
impl<Head: Clone + Clone + Display, Leaf: Clone + Clone + PartialEq + Eq + Display + Hash> Clone for GenericActions<Head, Leaf>
Source§fn clone(&self) -> GenericActions<Head, Leaf>
fn clone(&self) -> GenericActions<Head, Leaf>
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<Head: Debug + Clone + Display, Leaf: Debug + Clone + PartialEq + Eq + Display + Hash> Debug for GenericActions<Head, Leaf>
impl<Head: Debug + Clone + Display, Leaf: Debug + Clone + PartialEq + Eq + Display + Hash> Debug for GenericActions<Head, Leaf>
Source§impl<Head, Leaf> Default for GenericActions<Head, Leaf>
impl<Head, Leaf> Default for GenericActions<Head, Leaf>
Source§impl<Head: Hash + Clone + Display, Leaf: Hash + Clone + PartialEq + Eq + Display + Hash> Hash for GenericActions<Head, Leaf>
impl<Head: Hash + Clone + Display, Leaf: Hash + Clone + PartialEq + Eq + Display + Hash> Hash for GenericActions<Head, Leaf>
Source§impl<Head: PartialEq + Clone + Display, Leaf: PartialEq + Clone + PartialEq + Eq + Display + Hash> PartialEq for GenericActions<Head, Leaf>
impl<Head: PartialEq + Clone + Display, Leaf: PartialEq + Clone + PartialEq + Eq + Display + Hash> PartialEq for GenericActions<Head, Leaf>
impl<Head: Eq + Clone + Display, Leaf: Eq + Clone + PartialEq + Eq + Display + Hash> Eq for GenericActions<Head, Leaf>
impl<Head: Clone + Display, Leaf: Clone + PartialEq + Eq + Display + Hash> StructuralPartialEq for GenericActions<Head, Leaf>
Auto Trait Implementations§
impl<Head, Leaf> Freeze for GenericActions<Head, Leaf>
impl<Head, Leaf> RefUnwindSafe for GenericActions<Head, Leaf>where
Leaf: RefUnwindSafe,
Head: RefUnwindSafe,
impl<Head, Leaf> Send for GenericActions<Head, Leaf>
impl<Head, Leaf> Sync for GenericActions<Head, Leaf>
impl<Head, Leaf> Unpin for GenericActions<Head, Leaf>
impl<Head, Leaf> UnwindSafe for GenericActions<Head, Leaf>where
Leaf: UnwindSafe,
Head: UnwindSafe,
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