pub struct CustomEffectProgramV3 { /* private fields */ }Expand description
Lazily registers a custom effect program (v3) and caches its EffectId.
V3 programs may request renderer-provided sources (e.g. src_raw + an optional bounded pyramid).
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 CustomEffectProgramV3
impl CustomEffectProgramV3
pub fn wgsl_utf8(source: impl Into<String>) -> Self
pub fn descriptor(&self) -> &CustomEffectDescriptorV3
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 CustomEffectProgramV3
impl Clone for CustomEffectProgramV3
Source§fn clone(&self) -> CustomEffectProgramV3
fn clone(&self) -> CustomEffectProgramV3
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 CustomEffectProgramV3
impl RefUnwindSafe for CustomEffectProgramV3
impl Send for CustomEffectProgramV3
impl Sync for CustomEffectProgramV3
impl Unpin for CustomEffectProgramV3
impl UnsafeUnpin for CustomEffectProgramV3
impl UnwindSafe for CustomEffectProgramV3
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