pub struct DirTree {
pub files: Vec<(String, Checksum)>,
pub dirs: Vec<(String, Checksum, Checksum)>,
}Expand description
An owned dirtree object. Both lists must be name-sorted (byte-wise,
strictly increasing) and no name may appear in both lists; serialize
validates this.
Fields§
§files: Vec<(String, Checksum)>(file name, content checksum), name-sorted.
dirs: Vec<(String, Checksum, Checksum)>(dir name, dirtree checksum, dirmeta checksum), name-sorted.
Implementations§
Trait Implementations§
impl Eq for DirTree
Source§impl GvEncode for DirTree
The encode path is purely mechanical: sort and cross-list validation runs in
DirTree::serialize, the only caller. The owned entry vectors encode
directly, since String and Checksum are themselves encodable.
impl GvEncode for DirTree
The encode path is purely mechanical: sort and cross-list validation runs in
DirTree::serialize, the only caller. The owned entry vectors encode
directly, since String and Checksum are themselves encodable.
Source§impl GvType for DirTree
impl GvType for DirTree
Source§const SIGNATURE: &'static str = "(a(say)a(sayay))"
const SIGNATURE: &'static str = "(a(say)a(sayay))"
The GVariant type signature, for the nameable leaf and object types.
Composite container impls (tuples, arrays) leave it empty: their
signature is compositional and is not needed to encode.
Source§const FIXED_SIZE: Option<usize> = None
const FIXED_SIZE: Option<usize> = None
Serialized size if fixed-size, else
None.impl StructuralPartialEq for DirTree
Auto Trait Implementations§
impl Freeze for DirTree
impl RefUnwindSafe for DirTree
impl Send for DirTree
impl Sync for DirTree
impl Unpin for DirTree
impl UnsafeUnpin for DirTree
impl UnwindSafe for DirTree
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