pub struct CreateFile {
pub path: String,
pub node_id: NodeId,
pub blob_id: ObjectId,
pub mode: u32,
}Expand description
Create file payload (FDD-03 §9.3).
Fields§
§path: StringRepo-relative UTF-8 path (repo_path).
node_id: NodeIdNode identity (bytes, 32).
blob_id: ObjectIdInitial blob ID (object_id).
mode: u32Mode bits (u32).
Implementations§
Source§impl CreateFile
impl CreateFile
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 a
path that violates the RepoPath grammar decode enforces (DC-54): encode must reject
exactly what decode rejects, using the same validator, so the two sides cannot drift.
Trait Implementations§
Source§impl CanonicalEncode for CreateFile
impl CanonicalEncode for CreateFile
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 CreateFile
impl Clone for CreateFile
Source§fn clone(&self) -> CreateFile
fn clone(&self) -> CreateFile
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 CreateFile
impl Debug for CreateFile
impl Eq for CreateFile
Source§impl PartialEq for CreateFile
impl PartialEq for CreateFile
impl StructuralPartialEq for CreateFile
Auto Trait Implementations§
impl Freeze for CreateFile
impl RefUnwindSafe for CreateFile
impl Send for CreateFile
impl Sync for CreateFile
impl Unpin for CreateFile
impl UnsafeUnpin for CreateFile
impl UnwindSafe for CreateFile
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