Skip to content

vihaco_abi::effect

effect

vihaco_abi::effect

classEffectssource

vihaco_abi::effect::Effects

Bases: Debug, Clone, StructuralPartialEq, PartialEq, Eq, From<Option<T>>, From<Vec<T>>, From<SmallVec<[T; 2]>>, IntoIterator

Rust enum.

pub enum Effects<T>

Variants

NameTypeDescription
None—
One(T)
Many(SmallVec&lt;[T; 2]&gt;)
source

methodappendsource

vihaco_abi::effect::Effects::append

pub fn append(self, effect: T) -> Self

Parameters

NameTypeDescription
effectT

Returns

Self

source

methodextendsource

vihaco_abi::effect::Effects::extend

pub fn extend(self, other: Self) -> Self

Parameters

NameTypeDescription
otherSelf

Returns

Self

source

methodflat_mapsource

vihaco_abi::effect::Effects::flat_map

pub fn flat_map<U>(self, f: impl FnMut(T) -> Effects<U>) -> Effects<U>

Parameters

NameTypeDescription
fimpl FnMut(T) -&gt; Effects&lt;U&gt;

Returns

Effects<U>

source

methodmanysource

vihaco_abi::effect::Effects::many

pub fn many(values: SmallVec<[T; 2]>) -> Self

Parameters

NameTypeDescription
valuesSmallVec&lt;[T; 2]&gt;

Returns

Self

source

methodmapsource

vihaco_abi::effect::Effects::map

pub fn map<U>(self, f: impl FnMut(T) -> U) -> Effects<U>

Parameters

NameTypeDescription
fimpl FnMut(T) -&gt; U

Returns

Effects<U>

source

methodnonesource

vihaco_abi::effect::Effects::none

pub fn none() -> Self

Returns

Self

source

methodonesource

vihaco_abi::effect::Effects::one

pub fn one(value: T) -> Self

Parameters

NameTypeDescription
valueT

Returns

Self

source