pub struct CustomEffectProgramV1 { /* private fields */ }Expand description
Lazily registers a custom effect program (v1) and caches its EffectId.
This is intended for app/ecosystem code that wants to author a small WGSL snippet while keeping
the Scene contract bounded (ADR 0299).
Notes:
- The cached
EffectIdis tied to the current renderer instance. If the renderer is recreated (e.g. device loss), callinvalidate()and re-register.
Implementations§
Source§impl CustomEffectProgramV1
impl CustomEffectProgramV1
pub fn wgsl_utf8(source: impl Into<String>) -> Self
pub fn descriptor(&self) -> &CustomEffectDescriptorV1
pub fn id(&self) -> Option<EffectId>
pub fn invalidate(&mut self)
pub fn ensure_registered( &mut self, effects: &mut dyn CustomEffectService, ) -> Result<EffectId, CustomEffectRegistrationError>
pub fn unregister(&mut self, effects: &mut dyn CustomEffectService) -> bool
Trait Implementations§
Source§impl Clone for CustomEffectProgramV1
impl Clone for CustomEffectProgramV1
Source§fn clone(&self) -> CustomEffectProgramV1
fn clone(&self) -> CustomEffectProgramV1
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for CustomEffectProgramV1
impl RefUnwindSafe for CustomEffectProgramV1
impl Send for CustomEffectProgramV1
impl Sync for CustomEffectProgramV1
impl Unpin for CustomEffectProgramV1
impl UnsafeUnpin for CustomEffectProgramV1
impl UnwindSafe for CustomEffectProgramV1
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