pub struct ControlFile {
pub version: String,
pub filename: Option<String>,
pub mtime: Option<String>,
pub blocksize: usize,
pub length: u64,
pub hash_lengths: HashLengths,
pub urls: Vec<String>,
pub sha1: Option<String>,
pub block_checksums: Vec<BlockChecksum>,
}Fields§
§version: String§filename: Option<String>§mtime: Option<String>§blocksize: usize§length: u64§hash_lengths: HashLengths§urls: Vec<String>§sha1: Option<String>§block_checksums: Vec<BlockChecksum>Implementations§
Source§impl ControlFile
impl ControlFile
pub fn parse<R: Read>(reader: R) -> Result<Self, ParseError>
pub fn num_blocks(&self) -> usize
Trait Implementations§
Source§impl Clone for ControlFile
impl Clone for ControlFile
Source§fn clone(&self) -> ControlFile
fn clone(&self) -> ControlFile
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 moreAuto Trait Implementations§
impl Freeze for ControlFile
impl RefUnwindSafe for ControlFile
impl Send for ControlFile
impl Sync for ControlFile
impl Unpin for ControlFile
impl UnsafeUnpin for ControlFile
impl UnwindSafe for ControlFile
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