pub struct RenamePath {
pub node_id: NodeId,
pub old_path: String,
pub new_path: String,
}Expand description
Rename path payload (FDD-03 §9.3, node-addressed).
Fields§
§node_id: NodeIdNode identity (bytes, 32).
old_path: StringOld repo-relative path (repo_path).
new_path: StringNew repo-relative path (repo_path).
Implementations§
Source§impl RenamePath
impl RenamePath
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Reject an all-zero node_id; FDD-03 §9.3 forbids the reserved value in any
persisted node-bearing operation, and the encoder produces identity bytes. Also reject an
old_path or new_path that violates the RepoPath grammar decode enforces (DC-54) —
both fields are checked independently, since a path-safe new_path must not mask an
unsafe old_path.
Trait Implementations§
Source§impl CanonicalEncode for RenamePath
impl CanonicalEncode for RenamePath
Source§fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>
fn encode_canonical(&self, writer: &mut CanonicalWriter) -> Result<()>
Encode this value into canonical bytes.
Source§impl Clone for RenamePath
impl Clone for RenamePath
Source§fn clone(&self) -> RenamePath
fn clone(&self) -> RenamePath
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 RenamePath
impl Debug for RenamePath
impl Eq for RenamePath
Source§impl PartialEq for RenamePath
impl PartialEq for RenamePath
impl StructuralPartialEq for RenamePath
Auto Trait Implementations§
impl Freeze for RenamePath
impl RefUnwindSafe for RenamePath
impl Send for RenamePath
impl Sync for RenamePath
impl Unpin for RenamePath
impl UnsafeUnpin for RenamePath
impl UnwindSafe for RenamePath
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