Where

Constructors

this
this(U[] list)

Members

Functions

and
auto and()

Does nothing but improve code readability

any
auto any()

Query array properties

equal
auto equal()

Check equality

exists
bool exists()

Check if the filtered list has at least one value

isAnyOf
auto isAnyOf()

Returns all items that match at least one value

not
auto not()

Negates the next filter

opApply
int opApply(scope int delegate(ref U) dg)

Iterate over the filtered items

opApply
int opApply(scope int delegate(size_t index, ref U) dg)

Iterate over the filtered items

rootItem
RootType rootItem()

Examples

Filter callables by attribute name

1 import introspection.callable;
2 import introspection.attribute;
3 
4 @("test")
5 void test() { }
6 
7 enum item = describeCallable!test;
8 enum items = [ item ];
9 
10 ///auto hasAttribute = items.where.any.attributes.name.equal!`"test"`.exists;
11 
12 //hasAttribute.should.equal(true);
13 items.where.any.attributes.name.equal!"other".exists.should.equal(false);

Meta