pub enum PieceLength {
Automatic,
Exact(u64),
Target {
pieces: u64,
maximum: u64,
},
}Expand description
Automatic or caller-selected piece length.
Variants§
Automatic
Select using PIECE_LENGTH_POLICY_ID.
Exact(u64)
Use an explicit byte count after validation.
Target
Select automatically while targeting a maximum piece count and length.
Trait Implementations§
Source§impl Clone for PieceLength
impl Clone for PieceLength
Source§fn clone(&self) -> PieceLength
fn clone(&self) -> PieceLength
Returns a duplicate of the value. Read more
1.0.0 · 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 PieceLength
impl Debug for PieceLength
Source§impl Default for PieceLength
impl Default for PieceLength
Source§fn default() -> PieceLength
fn default() -> PieceLength
Returns the “default value” for a type. Read more
Source§impl PartialEq for PieceLength
impl PartialEq for PieceLength
impl Copy for PieceLength
impl Eq for PieceLength
impl StructuralPartialEq for PieceLength
Auto Trait Implementations§
impl Freeze for PieceLength
impl RefUnwindSafe for PieceLength
impl Send for PieceLength
impl Sync for PieceLength
impl Unpin for PieceLength
impl UnwindSafe for PieceLength
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