pub enum DestinationMessage {
DirectoryManifestChunk {
dst: PathBuf,
entries: Vec<ExistingEntry>,
},
DirectoryCreated {
src: PathBuf,
dst: PathBuf,
},
DirectorySkipped {
src: PathBuf,
dst: PathBuf,
},
DestinationDone,
}Expand description
Messages sent from destination to source on the control stream.
Variants§
DirectoryManifestChunk
Carry a chunk of the (reused) destination directory’s pre-existing-entry manifest, used
by the source to skip transferring identical files. A directory’s manifest is split into
one or more chunks (each well under the control stream’s frame limit) and ALL of them are
sent BEFORE the directory’s DirectoryCreated; the control stream is FIFO, so the source
has the complete manifest by the time it sees DirectoryCreated. No chunks are sent for a
freshly-created directory, when neither --overwrite nor --ignore-existing is active, or
when the directory exceeds the manifest cap (see RcpdConfig::overwrite_manifest_max_entries).
DirectoryCreated
Confirm directory created, request file transfers. This is purely the
Pass-2 trigger: it tells the source the destination created the directory
and is ready to receive its files. The source already retains the
authoritative Pass-1 file count for the directory (in its fd-map entry under
hardened reads, or in a path→count map under -L), so no count is echoed
back here. Any DirectoryManifestChunks for this directory precede this message.
DirectorySkipped
Acknowledge a Directory message the destination did NOT create (create
failed, ancestor failed, or --ignore-existing skipped a non-directory).
No files will be requested for it. The destination sends exactly one of
DirectoryCreated / DirectorySkipped per Directory message so the
source can release the matching held directory fd (see the source-side
fd-map / dir-fd budget in rcp::source): without this nack a skipped
directory’s Pass-1 permit would never be released, hanging large no-ack
subtrees. src keys the source-side fd-map entry to release (the map is
inserted under src; see take_for_skipped); dst is carried for
symmetry/logging.
DestinationDone
Signal destination has finished all operations. Initiates graceful shutdown via stream closure.
Trait Implementations§
Source§impl Clone for DestinationMessage
impl Clone for DestinationMessage
Source§fn clone(&self) -> DestinationMessage
fn clone(&self) -> DestinationMessage
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 DestinationMessage
impl Debug for DestinationMessage
Source§impl<'de> Deserialize<'de> for DestinationMessage
impl<'de> Deserialize<'de> for DestinationMessage
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>,
Auto Trait Implementations§
impl Freeze for DestinationMessage
impl RefUnwindSafe for DestinationMessage
impl Send for DestinationMessage
impl Sync for DestinationMessage
impl Unpin for DestinationMessage
impl UnsafeUnpin for DestinationMessage
impl UnwindSafe for DestinationMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request