Trait const_gen::CompileConstArray
source · pub trait CompileConstArray {
// Required methods
fn const_array_type(&self) -> String;
fn const_array_val(&self) -> String;
// Provided methods
fn array_declaration(
&self,
attrs: &str,
vis: &str,
declaration_type: DeclarationType,
name: &str
) -> String { ... }
fn const_array_declaration(
&self,
attrs: &str,
vis: &str,
name: &str
) -> String { ... }
fn static_array_declaration(
&self,
attrs: &str,
vis: &str,
name: &str
) -> String { ... }
}
Expand description
Trait which defines how an array-representable type should be represented as a const array
Required Methods§
sourcefn const_array_type(&self) -> String
fn const_array_type(&self) -> String
Like const_type, but for a fixed-size array.
sourcefn const_array_val(&self) -> String
fn const_array_val(&self) -> String
Like const_val, but for a fixed-size array.
Provided Methods§
sourcefn array_declaration(
&self,
attrs: &str,
vis: &str,
declaration_type: DeclarationType,
name: &str
) -> String
fn array_declaration( &self, attrs: &str, vis: &str, declaration_type: DeclarationType, name: &str ) -> String
Like declaration, but for a fixed-size array.
sourcefn const_array_declaration(&self, attrs: &str, vis: &str, name: &str) -> String
fn const_array_declaration(&self, attrs: &str, vis: &str, name: &str) -> String
Like const_declaration, but for a fixed-size array.
sourcefn static_array_declaration(&self, attrs: &str, vis: &str, name: &str) -> String
fn static_array_declaration(&self, attrs: &str, vis: &str, name: &str) -> String
Like static_declaration, but for a fixed-size array.