pub struct Car {
pub roots: Vec<Cid>,
pub blocks: BTreeMap<Cid, Vec<u8>>,
}Expand description
A CAR file, read apart.
Fields§
§roots: Vec<Cid>The roots the header declares, in the order it declares them.
A file may declare none, and one that declares several is legal. What a root means is the caller’s to know: a repository export roots at a commit, and the Merkle search tree vectors root at a tree node.
blocks: BTreeMap<Cid, Vec<u8>>Every block in the file, by CID.
Ordered, because a BTreeMap keyed by CID is the order
write() wants to hand them back in, so a file that is read and
rewritten comes out canonically ordered whatever order it arrived in.
Trait Implementations§
impl Eq for Car
impl StructuralPartialEq for Car
Auto Trait Implementations§
impl Freeze for Car
impl RefUnwindSafe for Car
impl Send for Car
impl Sync for Car
impl Unpin for Car
impl UnsafeUnpin for Car
impl UnwindSafe for Car
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.