pub struct EffectLayer {
pub priority: i16,
pub weight: f32,
pub effect: PresentationEffect,
}Expand description
One weighted module in a reusable render profile.
Fields§
§priority: i16Lower priorities resolve first. Equal priorities preserve insertion order.
weight: f32Interpolation weight, sanitized to [0, 1] while resolving.
effect: PresentationEffectTyped effect settings.
Implementations§
Source§impl EffectLayer
impl EffectLayer
Sourcepub const fn new(effect: PresentationEffect) -> Self
pub const fn new(effect: PresentationEffect) -> Self
Creates a fully weighted layer at priority zero.
Sourcepub const fn with_weight(self, weight: f32) -> Self
pub const fn with_weight(self, weight: f32) -> Self
Sets the layer’s interpolation weight.
Sourcepub const fn with_priority(self, priority: i16) -> Self
pub const fn with_priority(self, priority: i16) -> Self
Sets the layer’s ordering priority.
Trait Implementations§
Source§impl Clone for EffectLayer
impl Clone for EffectLayer
impl Copy for EffectLayer
Source§impl Debug for EffectLayer
impl Debug for EffectLayer
Source§impl<'de> Deserialize<'de> for EffectLayer
impl<'de> Deserialize<'de> for EffectLayer
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EffectLayer
impl PartialEq for EffectLayer
Source§impl Serialize for EffectLayer
impl Serialize for EffectLayer
impl StructuralPartialEq for EffectLayer
Auto Trait Implementations§
impl Freeze for EffectLayer
impl RefUnwindSafe for EffectLayer
impl Send for EffectLayer
impl Sync for EffectLayer
impl Unpin for EffectLayer
impl UnsafeUnpin for EffectLayer
impl UnwindSafe for EffectLayer
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<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more