pub struct CustomEffectProgramV2 { /* private fields */ }Expand description
Lazily registers a custom effect program (v2) and caches its EffectId.
V2 programs may reference additional versioned bindings (e.g. a single user image input).
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 CustomEffectProgramV2
impl CustomEffectProgramV2
pub fn wgsl_utf8(source: impl Into<String>) -> Self
pub fn descriptor(&self) -> &CustomEffectDescriptorV2
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 CustomEffectProgramV2
impl Clone for CustomEffectProgramV2
Source§fn clone(&self) -> CustomEffectProgramV2
fn clone(&self) -> CustomEffectProgramV2
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 CustomEffectProgramV2
impl RefUnwindSafe for CustomEffectProgramV2
impl Send for CustomEffectProgramV2
impl Sync for CustomEffectProgramV2
impl Unpin for CustomEffectProgramV2
impl UnsafeUnpin for CustomEffectProgramV2
impl UnwindSafe for CustomEffectProgramV2
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