pub trait LiquidModifierExt {
// Required methods
fn glass_effect(self, glass: Glass) -> Modifier;
fn glass_effect_with(
self,
glass: Glass,
dynamics: impl Fn() -> GlassDynamics + 'static,
) -> Modifier;
}Expand description
Modifier extension installing the Liquid Glass material.
Required Methods§
Sourcefn glass_effect(self, glass: Glass) -> Modifier
fn glass_effect(self, glass: Glass) -> Modifier
Applies the glass material to this composable’s bounds: backdrop blur +
lens shader, clipped to glass.shape, with a soft drop shadow.
Must be called in composable context (the material resolves theme colors at the call site).
Sourcefn glass_effect_with(
self,
glass: Glass,
dynamics: impl Fn() -> GlassDynamics + 'static,
) -> Modifier
fn glass_effect_with( self, glass: Glass, dynamics: impl Fn() -> GlassDynamics + 'static, ) -> Modifier
glass_effect with per-frame motion inputs; the
closure is read at scene-build time, so animating tilt or highlight
does not recompose.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".