pub struct OpenRepositoryReply {
pub handle: u64,
pub hash_algorithm: Option<String>,
pub objects_device_id: Option<u64>,
}Expand description
Reply carrying an opaque repository handle and basic repository metadata.
The hash_algorithm and objects_device_id fields let a client making a
cross-repository copy decide whether zero-copy (reflink / hardlink)
transfer is viable for a given source–destination pair:
-
hash_algorithm—"sha256"or"sha512". Hardlink (zero-copy) requires both repositories to use the same algorithm, because fs-verity is enabled on the shared inode. Reflink and regular copy work across algorithms (each produces a fresh inode re-digested under the destination’s algorithm). -
objects_device_id— thest_devof the repository’s objects directory. Both reflink (FICLONE) and hardlink (linkat) require source and destination to reside on the same filesystem; comparingobjects_device_idfrom both sides lets the client detect this up front. Note:st_devis only meaningful when both servers share a mount namespace (the typical same-host deployment). If they do not, the worst case is a failedPutLayer(EXDEV), not silent data corruption.
Fields§
§handle: u64The opaque handle to pass to subsequent repository methods.
hash_algorithm: Option<String>The fs-verity hash algorithm used by this repository ("sha256" or
"sha512").
None on old servers that do not report this field (serde default).
objects_device_id: Option<u64>The st_dev of the repository’s objects directory, as a decimal u64.
Clients comparing two repositories should treat matching values as
“likely same filesystem” (and thus eligible for reflink/hardlink).
None on old servers.
Trait Implementations§
Source§impl Clone for OpenRepositoryReply
impl Clone for OpenRepositoryReply
Source§fn clone(&self) -> OpenRepositoryReply
fn clone(&self) -> OpenRepositoryReply
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OpenRepositoryReply
impl Debug for OpenRepositoryReply
Source§impl<'de> Deserialize<'de> for OpenRepositoryReply
impl<'de> Deserialize<'de> for OpenRepositoryReply
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>,
Source§impl Serialize for OpenRepositoryReply
impl Serialize for OpenRepositoryReply
Auto Trait Implementations§
impl Freeze for OpenRepositoryReply
impl RefUnwindSafe for OpenRepositoryReply
impl Send for OpenRepositoryReply
impl Sync for OpenRepositoryReply
impl Unpin for OpenRepositoryReply
impl UnsafeUnpin for OpenRepositoryReply
impl UnwindSafe for OpenRepositoryReply
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
§impl<S> CanonJsonSerialize for Swhere
S: Serialize,
impl<S> CanonJsonSerialize for Swhere
S: Serialize,
§fn to_canon_json_writer<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
fn to_canon_json_writer<W>(&self, writer: W) -> Result<(), Error>where
W: Write,
§fn to_canon_json_vec(&self) -> Result<Vec<u8>, Error>
fn to_canon_json_vec(&self) -> Result<Vec<u8>, Error>
§fn to_canon_json_string(&self) -> Result<String, Error>
fn to_canon_json_string(&self) -> Result<String, Error>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more