pub struct CacheMangler<'a, T: Mangler> { /* private fields */ }Expand description
A mangler that remembers and can unmangle.
Implementations§
Trait Implementations§
Source§impl<T: Mangler> Mangler for CacheMangler<'_, T>
impl<T: Mangler> Mangler for CacheMangler<'_, T>
Source§fn mangle(&self, path: &ModulePath, item: &str) -> String
fn mangle(&self, path: &ModulePath, item: &str) -> String
Turn an import path and item name into a mangled WGSL identifier.
Source§fn unmangle(&self, mangled: &str) -> Option<(ModulePath, String)>
fn unmangle(&self, mangled: &str) -> Option<(ModulePath, String)>
Reverse the
Mangler::mangle operation. Implementing this is optional.Source§fn mangle_types(
&self,
item: &str,
variant: u32,
_types: &[TypeExpression],
) -> String
fn mangle_types( &self, item: &str, variant: u32, _types: &[TypeExpression], ) -> String
Used for generics. Is experimental. Implementing is optional.
Auto Trait Implementations§
impl<'a, T> !Freeze for CacheMangler<'a, T>
impl<'a, T> !RefUnwindSafe for CacheMangler<'a, T>
impl<'a, T> !Sync for CacheMangler<'a, T>
impl<'a, T> Send for CacheMangler<'a, T>where
T: Sync,
impl<'a, T> Unpin for CacheMangler<'a, T>
impl<'a, T> UnsafeUnpin for CacheMangler<'a, T>
impl<'a, T> UnwindSafe for CacheMangler<'a, T>where
T: RefUnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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