pub trait BufferLeaf {
// Required methods
fn buffer_array(&self) -> Option<&Array>;
fn buffer_array_mut(&mut self) -> Option<&mut Array>;
}Expand description
What a #[tree(buffer)] field may hold: an Array, or an Option<Array> (a leaf when
present, as MLX’s optional buffers such as affine-only quantization biases).
Required Methods§
Sourcefn buffer_array(&self) -> Option<&Array>
fn buffer_array(&self) -> Option<&Array>
The array, if present.
Sourcefn buffer_array_mut(&mut self) -> Option<&mut Array>
fn buffer_array_mut(&mut self) -> Option<&mut Array>
The array, mutably, if present.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".