Struct flag_set::FlagSet[][src]

pub struct FlagSet<T: Eq + Hash>(_, _);

Implementations

impl<'a, T: Eq + Hash + Clone> FlagSet<T>[src]

pub fn new(vector: Vec<T>, flag: bool) -> Self[src]

用vector和bool新建实例。
Ccreating an instance with a vector and a boolean value.

pub fn contains(&self, value: T) -> bool[src]

判断集合是否包含值。
Identifying whether set contains value

Trait Implementations

impl<T: Eq + Hash + Clone> Add<FlagSet<T>> for FlagSet<T>[src]

type Output = Self

The resulting type after applying the + operator.

fn add(self, other: Self) -> Self::Output[src]

A + B
A和B会销毁,所以用希望保留A和B的话,请使用A.clone() + B.clone()。
A and B will be consumed. If you want to reserve A and B, using A.clone() + B.clone() instead of A + B.

impl<T: Eq + Hash + Clone> BitAnd<FlagSet<T>> for FlagSet<T>[src]

type Output = Self

The resulting type after applying the & operator.

fn bitand(self, other: Self) -> Self::Output[src]

A & B
A和B会销毁,所以用希望保留A和B的话,请使用A.clone() & B.clone()。
A and B will be consumed. If you want to reserve A and B, using A.clone() & B.clone() instead of A & B.

impl<T: Eq + Hash + Clone> BitXor<FlagSet<T>> for FlagSet<T>[src]

type Output = Self

The resulting type after applying the ^ operator.

fn bitxor(self, other: Self) -> Self::Output[src]

A ^ B
A和B会销毁,所以用希望保留A和B的话,请使用A.clone() ^ B.clone()。
A and B will be consumed. If you want to reserve A and B, using A.clone() ^ B.clone() instead of A ^ B.

impl<T: Clone + Eq + Hash> Clone for FlagSet<T>[src]

impl<T: Debug + Eq + Hash> Debug for FlagSet<T>[src]

impl<T: Eq + Hash> Default for FlagSet<T>[src]

fn default() -> Self[src]

空集。
Creating an empty set.

impl<T: Eq + Hash> Eq for FlagSet<T>[src]

impl<T: Eq + Hash + Clone> Not for FlagSet<T>[src]

type Output = Self

The resulting type after applying the ! operator.

fn not(self) -> Self::Output[src]

!A
不同于二(次)元操作,A不会销毁,只转换了A的布尔值。
! operation differs from the above binary operations. A only transforms its bool value. A is not destroyed.

impl<T: PartialEq + Eq + Hash> PartialEq<FlagSet<T>> for FlagSet<T>[src]

impl<T: Eq + Hash> StructuralEq for FlagSet<T>[src]

impl<T: Eq + Hash> StructuralPartialEq for FlagSet<T>[src]

impl<T: Eq + Hash + Clone> Sub<FlagSet<T>> for FlagSet<T>[src]

type Output = Self

The resulting type after applying the - operator.

fn sub(self, other: Self) -> Self::Output[src]

A - B
A和B会销毁,所以用希望保留A和B的话,请使用A.clone() - B.clone()。
A and B will be consumed. If you want to reserve A and B, using A.clone() - B.clone() instead of A - B.

Auto Trait Implementations

impl<T> RefUnwindSafe for FlagSet<T> where
    T: RefUnwindSafe

impl<T> Send for FlagSet<T> where
    T: Send

impl<T> Sync for FlagSet<T> where
    T: Sync

impl<T> Unpin for FlagSet<T> where
    T: Unpin

impl<T> UnwindSafe for FlagSet<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.