weave-weft · local
Source declarations, signatures and documentation for local.
Reviewed implementation boundary: Producer signatures must be computed over the exact manifest before validate/from_bytes or publication; an empty signature is rejected. Reader interfaces do not establish constant-memory storage, and chain reference metadata alone does not submit or prove anchoring. See /libraries/weft/publish.
Source: sigil/weave/models/weft/src/local.rs. SHA-256: 3471cb4ab174325a5d12f09a5e7f119d24086b843f971e97e848920f2b76a8e1.
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.
local::LocalWeftStore
Filesystem-backed local Weft store.
#[derive(Debug, Clone)]
pub struct LocalWeftStore {
}Source line: 25.
local::PublishedWeft
Result of publishing bytes into a local Weft store.
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PublishedWeft {
/// Validated manifest for the payload.
pub manifest: WeftManifest,
/// Canonical manifest bytes committed by Sigil.
pub manifest_bytes: Vec<u8>,
/// Availability advertisement written for the local peer.
pub advertisement: AvailabilityAdvertisement
}Source line: 35.
local::LocalWeftStatus
Minimal operator-facing store status.
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct LocalWeftStatus {
/// Number of locally known Weft roots.
pub roots: u64,
/// Number of locally stored chunks.
pub chunks: u64,
/// Total bytes across locally stored chunks.
pub bytes: u64,
/// Peers represented by local advertisements.
pub peers: Vec<PeerId>
}Source line: 46.
local::LocalWeftStore::in_memory
Create an in-memory local store.
pub fn in_memory() -> Self;Source line: 65.
local::LocalWeftStore::open
Open or create a filesystem-backed local store.
pub fn open(path: impl AsRef<Path>) -> Result<Self>;Source line: 76.
local::LocalWeftStore::publish_bytes
Publish a payload as canonical chunks, manifest bytes, and availability.
pub fn publish_bytes(
&self,
bytes: &[u8],
config: ChunkConfig,
producer: ManifestProducer,
artifact: ArtifactMetadata,
peer: PeerId,
) -> Result<PublishedWeft>;Source line: 88.
local::LocalWeftStore::publish_reader
Publish bytes from a reader without requiring one contiguous input buffer.
pub fn publish_reader<R: Read>(
&self,
reader: R,
config: ChunkConfig,
producer: ManifestProducer,
artifact: ArtifactMetadata,
peer: PeerId,
) -> Result<PublishedWeft>;Source line: 162.
local::LocalWeftStore::serve_manifest
Serve a validated manifest by root.
pub fn serve_manifest(&self, root: WeftHash) -> Result<Option<WeftManifest>>;Source line: 241.
local::LocalWeftStore::serve_manifest_bytes
Serve canonical manifest bytes by root.
pub fn serve_manifest_bytes(&self, root: WeftHash) -> Result<Option<Vec<u8>>>;Source line: 273.
local::LocalWeftStore::serve_chunk
Serve one chunk by descriptor.
pub fn serve_chunk(&self, chunk: &ChunkDescriptor) -> Result<Option<Vec<u8>>>;Source line: 289.
local::LocalWeftStore::fetch_payload
Discover advertisements, fetch chunks, and verify/reassemble a payload.
pub async fn fetch_payload(&self, root: WeftHash, max_parallelism: usize) -> Result<Vec<u8>>;Source line: 316.
local::LocalWeftStore::status
Return local store status.
pub fn status(&self) -> Result<LocalWeftStatus>;Source line: 344.