pub struct WgslShaderCode(/* private fields */);Implementations§
Source§impl WgslShaderCode
impl WgslShaderCode
pub fn from_glsl(glsl: &str) -> Result<Self, ShaderProcessingError>
pub fn remove_function( &mut self, function_name: &str, ) -> Result<(), ShaderProcessingError>
pub fn has_function(&self, function_name: &str) -> bool
pub fn rename_function( &mut self, old_function_name: &str, new_function_name: &str, ) -> Result<(), ShaderProcessingError>
pub fn remove_line(&mut self, line_to_be_removed: &str)
pub fn add_line(&mut self, line: &str)
pub fn write_to_file(&self, path: impl AsRef<Path>) -> Result<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WgslShaderCode
impl RefUnwindSafe for WgslShaderCode
impl Send for WgslShaderCode
impl Sync for WgslShaderCode
impl Unpin for WgslShaderCode
impl UnwindSafe for WgslShaderCode
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.