#[non_exhaustive]pub enum PartExpected {
SizeOnly,
Crc32(u32),
Zeros,
EmptyBlock {
units: u32,
},
}Expand description
Post-write content invariant for a Region.
By default only the sentinel-source regions (Zeros, EmptyBlock) carry a
meaningful expectation; Patch-sourced regions default to
PartExpected::SizeOnly. Call Plan::compute_crc32 to populate every
region (including Patch) with PartExpected::Crc32.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SizeOnly
Only the byte count is checked.
Crc32(u32)
CRC32 of the region’s expected output bytes (populated by
Plan::compute_crc32; not emitted by PlanBuilder
out of the box).
Zeros
Region must be all-zero bytes.
EmptyBlock
Region must match the canonical SqPack empty-block payload for units
128-byte blocks.
Trait Implementations§
Source§impl Clone for PartExpected
impl Clone for PartExpected
Source§fn clone(&self) -> PartExpected
fn clone(&self) -> PartExpected
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 PartExpected
impl Debug for PartExpected
Source§impl PartialEq for PartExpected
impl PartialEq for PartExpected
Source§fn eq(&self, other: &PartExpected) -> bool
fn eq(&self, other: &PartExpected) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PartExpected
impl StructuralPartialEq for PartExpected
Auto Trait Implementations§
impl Freeze for PartExpected
impl RefUnwindSafe for PartExpected
impl Send for PartExpected
impl Sync for PartExpected
impl Unpin for PartExpected
impl UnsafeUnpin for PartExpected
impl UnwindSafe for PartExpected
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