Struct egs_api::api::types::chunk::Chunk[][src]

pub struct Chunk {
    pub guid: String,
    pub hash: u64,
    pub sha_hash: Option<Vec<u8>>,
    pub hash_type: Option<u8>,
    pub uncompressed_size: Option<u32>,
    pub data: Vec<u8>,
    // some fields omitted
}

Struct holding data for downloaded chunks

Fields

guid: String

Guid of the chunk

hash: u64

Chunk Hash

sha_hash: Option<Vec<u8>>

Chunk sha hash

hash_type: Option<u8>

1 = rolling hash, 2 = sha hash, 3 = both

uncompressed_size: Option<u32>

Total chunk size

data: Vec<u8>

Chunk data

Implementations

impl Chunk[src]

pub fn from_vec(buffer: Vec<u8>) -> Option<Chunk>[src]

Parse chunk from binary vector

Trait Implementations

impl Clone for Chunk[src]

impl Debug for Chunk[src]

impl Default for Chunk[src]

impl PartialEq<Chunk> for Chunk[src]

impl StructuralPartialEq for Chunk[src]

Auto Trait Implementations

impl RefUnwindSafe for Chunk

impl Send for Chunk

impl Sync for Chunk

impl Unpin for Chunk

impl UnwindSafe for Chunk

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.