pub struct IndexPack {
pub id: PackId,
pub blobs: Vec<IndexBlob>,
pub time: Option<DateTime<Local>>,
pub size: Option<u32>,
}Expand description
Index information about a pack
Fields§
§id: PackIdpack Id
blobs: Vec<IndexBlob>Index information about contained blobs
time: Option<DateTime<Local>>The pack creation time or time when the pack was marked for deletion
size: Option<u32>The pack size
Implementations§
Source§impl IndexPack
impl IndexPack
Sourcepub(crate) fn add(
&mut self,
id: BlobId,
tpe: BlobType,
offset: u32,
length: u32,
uncompressed_length: Option<NonZeroU32>,
)
pub(crate) fn add( &mut self, id: BlobId, tpe: BlobType, offset: u32, length: u32, uncompressed_length: Option<NonZeroU32>, )
Add a new blob to the pack
§Arguments
id- The blob idtpe- The blob typeoffset- The blob offset within the packlength- The blob length within the packuncompressed_length- The blob uncompressed length within the pack
Trait Implementations§
Source§impl<'de> Deserialize<'de> for IndexPack
impl<'de> Deserialize<'de> for IndexPack
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Extend<IndexPack> for IndexCollector
impl Extend<IndexPack> for IndexCollector
Source§fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = IndexPack>,
fn extend<T>(&mut self, iter: T)where
T: IntoIterator<Item = IndexPack>,
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Auto Trait Implementations§
impl Freeze for IndexPack
impl RefUnwindSafe for IndexPack
impl Send for IndexPack
impl Sync for IndexPack
impl Unpin for IndexPack
impl UnwindSafe for IndexPack
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,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more