Weave documentation
Rust referenceloom-git

loom-git · schema

Source declarations, signatures and documentation for schema.

Source: sigil/weave/tools/loom-git/src/schema.rs. SHA-256: 7e7438de983154ba0132a1410eec7f098eaec2ac296f708bdba9c4f75686f4c6.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

schema::FileMode

File permission mode, matching loom's wire format.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum FileMode {
    Regular,
    Executable,
    Symlink,
}

Source line: 17.

schema::FileMode::from_git_mode

Translate a git tree-entry mode (u32 from the tree object) to loom.

pub fn from_git_mode(mode: u32) -> Option<Self>;

Source line: 25.

schema::ManifestEntry

One file entry inside a [TreeManifest].

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct ManifestEntry {
pub path: String,
/// Hex-encoded BLAKE3 of the blob content.

pub blob: String,
pub mode: FileMode,
pub size: u64
}

Source line: 38.

schema::TreeManifest

Sorted list of manifest entries. Sort happens in [Self::from_entries] to keep the canonical encoding stable.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct TreeManifest {
pub entries: Vec<ManifestEntry>
}

Source line: 49.

schema::TreeManifest::from_entries

pub fn from_entries(mut entries: Vec<ManifestEntry>) -> Self;

Source line: 54.

schema::TreeManifest::id

pub fn id(&self) -> Result<String, serde_json::Error>;

Source line: 59.

schema::Commit

A loom commit — same JSON shape as loom::manifest::Commit.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct Commit {
pub version: u32,
pub tree: TreeManifest,
pub tree_id: String,
/// Parent commit *sequence numbers* on the loom commits-strand. The

/// importer doesn't know the final seq numbers (the strand assigns them

/// at append time), so the [`crate::ImportPlan`] carries parents as

/// indices into the draft list and the CLI shim translates to seqs.

pub parents: Vec<u64>,
pub author: String,
pub timestamp_ms: u64,
pub message: String
}

Source line: 67.

schema::Commit::id

pub fn id(&self) -> Result<String, serde_json::Error>;

Source line: 82.

On this page