pub trait SmallChar:
Copy
+ Default
+ Ord
+ Eq
+ Hash
+ Debug {
const ZERO: Self;
// Required methods
fn from_char(c: char) -> Option<Self>;
fn to_char(self) -> char;
}Expand description
Trait for character types that can be stored in SmallString.
This trait abstracts over different character representations:
u16: UTF-16 code unit (2 bytes), compatible with ITensors.jl’s SmallStringchar: Full Unicode code point (4 bytes), supports all Unicode characters
Default is u16 for memory efficiency and ITensors.jl compatibility.
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.