pub struct WeightManifest {
pub version: u32,
pub model_id: String,
pub shard_files: Vec<String>,
pub shard_lens: Vec<u64>,
pub tensors: Vec<WeightTensorRecord>,
}Expand description
2026-09-25: A staged model’s manifest, sent as length-prefixed JSON after
the client’s model request (write_weight_manifest). The per-shard
(base, rkey) pairs are sent later, in the verbs handshake.
Fields§
§version: u32§model_id: String2026-09-25: The directory the peer staged, as a string.
shard_files: Vec<String>2026-09-25: Shard file names in shard order; the verbs layers vector
lists the shard MRs in the same order.
shard_lens: Vec<u64>2026-09-25: Byte length of each shard file, in shard order.
tensors: Vec<WeightTensorRecord>Implementations§
Source§impl WeightManifest
impl WeightManifest
pub const VERSION: u32 = 1
Sourcepub fn num_shards(&self) -> usize
pub fn num_shards(&self) -> usize
2026-09-25: The number of shard files, which the client checks against the number of MRs the peer publishes per rail.
Sourcepub fn total_shard_bytes(&self) -> u64
pub fn total_shard_bytes(&self) -> u64
2026-09-25: The sum of shard_lens, which serve reserves on the
CommitLedger once per staged model.
Trait Implementations§
Source§impl Clone for WeightManifest
impl Clone for WeightManifest
Source§fn clone(&self) -> WeightManifest
fn clone(&self) -> WeightManifest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WeightManifest
impl Debug for WeightManifest
Source§impl<'de> Deserialize<'de> for WeightManifest
impl<'de> Deserialize<'de> for WeightManifest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for WeightManifest
impl PartialEq for WeightManifest
Source§impl Serialize for WeightManifest
impl Serialize for WeightManifest
impl Eq for WeightManifest
impl StructuralPartialEq for WeightManifest
Auto Trait Implementations§
impl Freeze for WeightManifest
impl RefUnwindSafe for WeightManifest
impl Send for WeightManifest
impl Sync for WeightManifest
impl Unpin for WeightManifest
impl UnwindSafe for WeightManifest
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.