pub enum Effects<T> {
None,
One(T),
Many(SmallVec<[T; 2]>),
}Variants§
Implementations§
Source§impl<T> Effects<T>
impl<T> Effects<T>
pub fn none() -> Self
pub fn one(value: T) -> Self
pub fn many(values: SmallVec<[T; 2]>) -> Self
pub fn append(self, effect: T) -> Self
pub fn extend(self, other: Self) -> Self
pub fn map<U>(self, f: impl FnMut(T) -> U) -> Effects<U>
pub fn flat_map<U>(self, f: impl FnMut(T) -> Effects<U>) -> Effects<U>
Trait Implementations§
Source§impl<T> IntoIterator for Effects<T>
impl<T> IntoIterator for Effects<T>
impl<T: Eq> Eq for Effects<T>
impl<T> StructuralPartialEq for Effects<T>
Auto Trait Implementations§
impl<T> Freeze for Effects<T>where
T: Freeze,
impl<T> RefUnwindSafe for Effects<T>where
T: RefUnwindSafe,
impl<T> Send for Effects<T>where
T: Send,
impl<T> Sync for Effects<T>where
T: Sync,
impl<T> Unpin for Effects<T>where
T: Unpin,
impl<T> UnsafeUnpin for Effects<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Effects<T>where
T: UnwindSafe + RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
impl<'src, T> IntoMaybe<'src, T> for Twhere
T: 'src,
§impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
impl<'p, T> Seq<'p, T> for Twhere
T: Clone,
§type Iter<'a> = Once<&'a T>
where
T: 'a
type Iter<'a> = Once<&'a T> where T: 'a
An iterator over the items within this container, by reference.
§fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
fn contains(&self, val: &T) -> boolwhere
T: PartialEq,
Check whether an item is contained within this sequence.
§fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
fn to_maybe_ref<'b>(item: <T as Seq<'p, T>>::Item<'b>) -> Maybe<T, &'p T>where
'p: 'b,
Convert an item of the sequence into a [
MaybeRef].