weave-loom · error
Source declarations, signatures and documentation for error.
Source: sigil/weave/tools/loom/src/error.rs. SHA-256: 6d45692334ac2023941bfa2a888633a924276f12ca2791ef6446c28723ecc834.
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.
error::LoomError
Errors that can occur during loom operations. Some variants are
declared ahead of the commands that emit them; #[allow(dead_code)]
keeps the typed surface stable as v1/v2 verbs land.
#[derive(Debug, Error)]
#[allow(dead_code)]
pub enum LoomError {
/// No `.loom/` directory was found walking up from the current directory.
#[error("not a loom repository (or any parent up to mount point /): no .loom/ directory")]
NotARepository,
/// A loom repository already exists at the requested path.
#[error("loom repository already exists at {0}")]
AlreadyInitialized(PathBuf),
/// The named ref does not exist.
#[error("ref not found: {0}")]
RefNotFound(String),
/// The working tree contains uncommitted changes that would be lost.
#[error("uncommitted changes would be overwritten: {0}")]
UncommittedChanges(String),
/// A path was outside the repository root.
#[error("path is outside the repository: {0}")]
PathOutsideRepo(PathBuf),
/// Repository configuration is malformed or missing required fields.
#[error("invalid repository config: {0}")]
InvalidConfig(String),
/// Required identity material is missing.
#[error("no signing identity available; run `loom identity create`")]
MissingIdentity,
/// A commit entry on the strand was malformed.
#[error("malformed commit at seq {seq}: {reason}")]
MalformedCommit {
/// Sequence number of the malformed commit.
seq: u64,
/// Human-readable reason.
reason: String,
},
/// Filesystem or I/O error.
#[error("io error: {0}")]
Io(#[from] std::io::Error),
/// JSON (de)serialization error.
#[error("serialization error: {0}")]
Json(#[from] serde_json::Error),
/// Errors propagated from the Weave SDK.
#[error("weave error: {0}")]
Weave(String),
/// Errors propagated from the Strand crate.
#[error("strand error: {0}")]
Strand(String),
/// Errors propagated from the Locus crate.
#[error("locus error: {0}")]
Locus(String),
/// Errors propagated from the Lens crate.
#[error("lens error: {0}")]
Lens(String),
/// A precondition failed (e.g. dirty index when a clean tree is required).
#[error("{0}")]
Other(String),
}Source line: 11.
error::Result
Convenience result alias.
pub type Result<T> = std::result::Result<T, LoomError>;Source line: 79.