l1fe-weave-core · filesystem::mirror
Source declarations, signatures and documentation for filesystem::mirror.
Reviewed implementation boundary: Some core wrappers derive transport keys from DID strings. Do not infer secret key custody or authenticated peers from a supplied DID string; inspect the chosen wrapper and transport configuration. See /libraries/weave-core/overview.
Source: sigil/weave/libs/weave-core/src/filesystem/mirror.rs. SHA-256: 3a2161e3a0b7dc19e008d4e994b6b2c1152e45fb4b42510896eeae6245aa56bf.
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.
filesystem::mirror::SyncDirection
Synchronization direction
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SyncDirection {
/// Sync from source to destination
SourceToDestination,
/// Sync from destination to source
DestinationToSource,
/// Bidirectional sync
Bidirectional,
}Source line: 16.
filesystem::mirror::MirrorConfig
Mirror configuration
#[derive(Debug, Clone)]
pub struct MirrorConfig {
/// Watch for changes
pub watch: bool,
/// Sparse replication
pub sparse: bool,
/// Sync interval in seconds
pub interval: u64
}Source line: 27.
filesystem::mirror::MirrorStatus
Mirror status
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MirrorStatus {
/// Mirror ID
pub id: String,
/// Source path
pub source: String,
/// Target path
pub target: String,
/// Active status
pub active: bool,
/// Last sync time
pub last_sync: Option<chrono::DateTime<chrono::Utc>>,
/// Files synced
pub files_synced: usize,
/// Bytes transferred
pub bytes_transferred: u64
}Source line: 48.
filesystem::mirror::Mirror
Mirror instance
pub struct Mirror {
}Source line: 66.
filesystem::mirror::Mirror::new
Create a new mirror
pub fn new(source: String, target: String, config: MirrorConfig) -> Self;Source line: 78.
filesystem::mirror::Mirror::start
Start mirroring
pub async fn start(&self, source_locus: Arc<Locus>, target_locus: Arc<Locus>) -> Result<()>;Source line: 100.
filesystem::mirror::Mirror::stop
Stop mirroring
pub async fn stop(&self) -> Result<()>;Source line: 183.
filesystem::mirror::Mirror::status
Get status
pub fn status(&self) -> MirrorStatus;Source line: 192.