pub struct SnapshotSource {
pub host: String,
pub user_name: String,
pub path: String,
}Expand description
Kopia’s snapshot identity triple: userName@host:path. Present on both
snapshot-create results and snapshot-list entries.
kopia’s JSON spells the user component userName; the typed field is
user_name:
use kopiur_kopia::SnapshotSource;
let src: SnapshotSource =
serde_json::from_str(r#"{"host":"prod","userName":"mydb","path":"/data"}"#).unwrap();
assert_eq!(src.user_name, "mydb");
assert_eq!(src.identity(), "mydb@prod:/data");Fields§
§host: StringThe kopia “host” component of identity.
user_name: StringThe kopia “user” component of identity. kopia’s JSON key is userName.
path: StringThe absolute source path that was snapshotted.
Implementations§
Trait Implementations§
Source§impl Clone for SnapshotSource
impl Clone for SnapshotSource
Source§fn clone(&self) -> SnapshotSource
fn clone(&self) -> SnapshotSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SnapshotSource
impl Debug for SnapshotSource
Source§impl<'de> Deserialize<'de> for SnapshotSource
impl<'de> Deserialize<'de> for SnapshotSource
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SnapshotSource
impl PartialEq for SnapshotSource
Source§fn eq(&self, other: &SnapshotSource) -> bool
fn eq(&self, other: &SnapshotSource) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SnapshotSource
impl Serialize for SnapshotSource
impl Eq for SnapshotSource
impl StructuralPartialEq for SnapshotSource
Auto Trait Implementations§
impl Freeze for SnapshotSource
impl RefUnwindSafe for SnapshotSource
impl Send for SnapshotSource
impl Sync for SnapshotSource
impl Unpin for SnapshotSource
impl UnsafeUnpin for SnapshotSource
impl UnwindSafe for SnapshotSource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more