pub trait Leaves {
// Required method
fn visit(&self, v: &mut Visit<'_>);
}Expand description
Anything whose array leaves can be visited in a fixed order with their paths: owned
trees and borrowed views (&T, (&A, &B), [T]). Object-safe.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementations on Foreign Types§
Source§impl<A: Leaves, B: Leaves, C: Leaves, D: Leaves, E: Leaves, F: Leaves, G: Leaves, H: Leaves> Leaves for (A, B, C, D, E, F, G, H)
impl<A: Leaves, B: Leaves, C: Leaves, D: Leaves, E: Leaves, F: Leaves, G: Leaves, H: Leaves> Leaves for (A, B, C, D, E, F, G, H)
Source§impl<A: Leaves, B: Leaves, C: Leaves, D: Leaves, E: Leaves, F: Leaves, G: Leaves> Leaves for (A, B, C, D, E, F, G)
impl<A: Leaves, B: Leaves, C: Leaves, D: Leaves, E: Leaves, F: Leaves, G: Leaves> Leaves for (A, B, C, D, E, F, G)
Source§impl<A: Leaves, B: Leaves, C: Leaves, D: Leaves, E: Leaves, F: Leaves> Leaves for (A, B, C, D, E, F)
impl<A: Leaves, B: Leaves, C: Leaves, D: Leaves, E: Leaves, F: Leaves> Leaves for (A, B, C, D, E, F)
Implementors§
impl Leaves for Array
impl Leaves for Param
impl Leaves for Quantized
A tree of buffers (never trainable, as quantized layers’ tensors) with MLX’s names
weight, scales and biases, and quant as a static field: eval(&q), the
transforms and save_safetensors take quantized weights directly.