[−][src]Enum c2rust_refactor::select::Filter
Filters used in certain script commands.
Variants
Kind(NodeKind)
kind(k)
: The node is of kind k
. See pick_node::NodeKind
for a list of supported node
kinds. Shorthand: k
is an alias for kind(k)
if k
is a valid node kind.
ItemKind(ItemLikeKind)
item_kind(k)
: The node is an itemlike of subkind k
. See select::filter::ItemLikeKind
for a list of supported itemlike subkinds. Shorthand: k
is an alias for item_kind(k)
if k
is a valid itemlike subkind.
Public
pub
: The node's visibility is set to "public". This implies the node must be item-like.
Mutable
mut
: The node's mutability is set to "mutable". This applies to statics, extern statics,
and ident patterns.
Name(Regex)
name(re)
: The node's name matches regular expression re
.
PathPrefix(usize, Box<Path>)
path_prefix(n, p)
: The prefix of the node's path, obtained by removing the last n
segments, is p
. Shorthand: path(p)
is an alias for path_prefix(0, p)
.
HasAttr(Symbol)
has_attr(a)
: The node has an attribute named a
.
Matches(AnyPattern)
match_k(p)
: The node matches a pattern p
of kind k
, according to the matcher
module. This implies that the node kind must match the pattern kind.
Marked(Symbol)
marked(l)
: The node is marked with label l
.
AnyChild(Box<Filter>)
any_child(f)
: At least one direct child of the node matches filter f
.
AllChild(Box<Filter>)
all_child(f)
: All direct children of the node match filter f
.
AnyDesc(Box<Filter>)
any_desc(f)
: At least one descendant of the node matches filter f
.
AllDesc(Box<Filter>)
all_desc(f)
: All descendants of the node match filter f
.
And(Vec<Filter>)
f1 && f2
: Filters f1
and f2
both hold on the node.
Or(Vec<Filter>)
f1 || f2
: At least one of filters f1
and f2
holds on the node.
Not(Box<Filter>)
!f
: Filter f
does not hold on the node.
Trait Implementations
impl Clone for Filter
[src]
fn clone(&self) -> Filter
[src]
default fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Filter
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Lone for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<E> SpecializationError for E
[src]
default fn not_found<S, T>(
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
[src]
trait_name: &'static str,
method_name: &'static str
) -> E where
T: ?Sized,
impl<T> Erased for T
[src]
impl<T> Send for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Same for T
type Output = T
Should always be Self
impl<T> MaybeResult for T
[src]
impl<'a, T> Captures for T where
T: ?Sized,
[src]
T: ?Sized,