Struct bwapi_wrapper::BWAPI_UnaryFilter
source · #[repr(C)]pub struct BWAPI_UnaryFilter<Container> {
pub pred: Container,
pub _phantom_0: PhantomData<UnsafeCell<Container>>,
}
Expand description
UnaryFilter allows for logical functor combinations.
@code Unit myUnit; // The following two if statements are equivalent if ( myUnit->getType().isWorker() && myUnit->isCompleted() && myUnit->isIdle() ) {}
if ( (IsWorker && IsCompleted && IsIdle)(myUnit) ) {} @endcode
@tparam PType The type being passed into the predicate, which will be of type bool(PType). @tparam Container (optional) Storage container for the function predicate. It is std::function<bool(PType)> by default.
Fields§
§pred: Container
§_phantom_0: PhantomData<UnsafeCell<Container>>
Trait Implementations§
source§impl<Container: Clone> Clone for BWAPI_UnaryFilter<Container>
impl<Container: Clone> Clone for BWAPI_UnaryFilter<Container>
source§fn clone(&self) -> BWAPI_UnaryFilter<Container>
fn clone(&self) -> BWAPI_UnaryFilter<Container>
Returns a copy 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<Container: Debug> Debug for BWAPI_UnaryFilter<Container>
impl<Container: Debug> Debug for BWAPI_UnaryFilter<Container>
source§impl<Container: Hash> Hash for BWAPI_UnaryFilter<Container>
impl<Container: Hash> Hash for BWAPI_UnaryFilter<Container>
source§impl<Container: PartialEq> PartialEq for BWAPI_UnaryFilter<Container>
impl<Container: PartialEq> PartialEq for BWAPI_UnaryFilter<Container>
source§fn eq(&self, other: &BWAPI_UnaryFilter<Container>) -> bool
fn eq(&self, other: &BWAPI_UnaryFilter<Container>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<Container: Copy> Copy for BWAPI_UnaryFilter<Container>
impl<Container: Eq> Eq for BWAPI_UnaryFilter<Container>
impl<Container> StructuralPartialEq for BWAPI_UnaryFilter<Container>
Auto Trait Implementations§
impl<Container> !RefUnwindSafe for BWAPI_UnaryFilter<Container>
impl<Container> Send for BWAPI_UnaryFilter<Container>where
Container: Send,
impl<Container> !Sync for BWAPI_UnaryFilter<Container>
impl<Container> Unpin for BWAPI_UnaryFilter<Container>where
Container: Unpin,
impl<Container> UnwindSafe for BWAPI_UnaryFilter<Container>where
Container: 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