pub struct DynamicCodeGenerator { /* private fields */ }Expand description
Dynamic code generator
Implementations§
Source§impl DynamicCodeGenerator
impl DynamicCodeGenerator
Sourcepub fn set_backend(&mut self, backend: CodegenBackend)
pub fn set_backend(&mut self, backend: CodegenBackend)
Set the code generation backend
Sourcepub fn format_type(&self, dtype: &DType) -> String
pub fn format_type(&self, dtype: &DType) -> String
Format a type for the current backend
Sourcepub fn format_shape(&self, shape: &Shape) -> String
pub fn format_shape(&self, shape: &Shape) -> String
Format a shape for the current backend
Sourcepub fn format_constant(&self, value: &ConstantValue) -> String
pub fn format_constant(&self, value: &ConstantValue) -> String
Format a constant for the current backend
Sourcepub fn format_expression(&self, expr: &str) -> String
pub fn format_expression(&self, expr: &str) -> String
Format an expression for the current backend
Auto Trait Implementations§
impl Freeze for DynamicCodeGenerator
impl RefUnwindSafe for DynamicCodeGenerator
impl Send for DynamicCodeGenerator
impl Sync for DynamicCodeGenerator
impl Unpin for DynamicCodeGenerator
impl UnsafeUnpin for DynamicCodeGenerator
impl UnwindSafe for DynamicCodeGenerator
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> 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