pub struct StdinSnapshot<'a> {
pub source_path: &'a str,
pub stdin_file: &'a str,
pub tags: &'a BTreeMap<String, String>,
pub override_source: Option<&'a str>,
pub opts: &'a SnapshotCreateOptions,
pub finalize_timeout: Option<Duration>,
}Expand description
Everything a stdin-fed snapshot needs except the producer itself.
A named struct rather than six positional parameters, for one specific
reason beyond the argument count: source_path and stdin_file are both
&str and are trivially transposable at a call site. Swapping them would
record the snapshot under the FILE name as its kopia source path — a silent
identity change, which orphans the whole history for that source and is
exactly the class of mistake this repo builds types to prevent.
Fields§
§source_path: &'a strThe VIRTUAL root kopia records the artifact under, e.g.
/stream/postgres.sql. Nothing is read from the pod’s filesystem.
stdin_file: &'a strThe single virtual file name stored inside that root, e.g.
postgres.sql. Becomes kopia’s --stdin-file.
Tags to stamp on the manifest.
override_source: Option<&'a str>username@hostname:path identity to record, overriding the mover pod’s
ambient user/host.
opts: &'a SnapshotCreateOptionssnapshot create argv options.
finalize_timeout: Option<Duration>How long kopia may take to FINALIZE after the writer closes. None falls
back to the client’s default_timeout, then
DEFAULT_STDIN_FINALIZE_TIMEOUT — never unbounded. Callers derive it
from the producer’s own timeout plus STDIN_FINALIZE_GRACE.
Trait Implementations§
Source§impl<'a> Clone for StdinSnapshot<'a>
impl<'a> Clone for StdinSnapshot<'a>
Source§fn clone(&self) -> StdinSnapshot<'a>
fn clone(&self) -> StdinSnapshot<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more