Weave documentation
Rust referenceweave-locus

weave-locus · ops

Source declarations, signatures and documentation for ops.

Reviewed implementation boundary: Rollback records a marker; mount descriptions and governance metadata alone do not execute mounting or enforce signature authorization. Operations can have separate metadata/blob failure points. See /libraries/locus/overview.

Source: sigil/weave/models/locus/src/ops.rs. SHA-256: d7a0ab8599d480c538c6777e7a8bcfb4bf9cceac45706115b607bc595057fc1d.

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.

ops::CreateOptions

Options for creating files/directories

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct CreateOptions {
/// File permissions mode

pub mode: Option<u32>,
/// Create parent directories if needed

pub create_parents: bool,
/// Fail if already exists

pub exclusive: bool,
/// Extended attributes

pub xattrs: Option<serde_json::Value>
}

Source line: 7.

ops::OpenOptions

Options for opening files

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct OpenOptions {
/// Open for reading

pub read: bool,
/// Open for writing

pub write: bool,
/// Open for appending

pub append: bool,
/// Truncate file on open

pub truncate: bool,
/// Create if doesn't exist

pub create: bool,
/// Fail if doesn't exist

pub exclusive: bool,
/// Permissions for new file

pub mode: Option<u32>
}

Source line: 23.

ops::OpenOptions::read

Open for reading only

pub fn read() -> Self;

Source line: 48.

ops::OpenOptions::write

Open for writing (truncate)

pub fn write() -> Self;

Source line: 56.

ops::OpenOptions::append

Open for appending

pub fn append() -> Self;

Source line: 66.

ops::WriteOptions

Options for writing files

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct WriteOptions {
/// Expected version (for optimistic concurrency)

pub version: Option<u64>,
/// Offset to write at

pub offset: Option<u64>,
/// Create parent directories

pub create_parents: bool,
/// File mode if creating

pub mode: Option<u32>
}

Source line: 78.

On this page