[][src]Struct asuran::repository::UnpackedChunk

pub struct UnpackedChunk {
    data: Vec<u8>,
    id: ChunkID,

A binary blob that has not yet undergone encryption, compression, or HMAC, but has had a ChunkID generated.


data: Vec<u8>id: ChunkID


impl UnpackedChunk[src]

pub fn new(data: Vec<u8>, settings: ChunkSettings, key: &Key) -> UnpackedChunk[src]

Creates a new UnpackedChunk using the provided data, and generating an ID using the hmac value of the provided ChunkSettings and the provided key.

pub fn id(&self) -> ChunkID[src]

Returns the chunkid

pub fn data(&self) -> &[u8][src]

Returns a refrence to the data

pub fn consuming_data(self) -> Vec<u8>[src]

Returns the data consuming self

Auto Trait Implementations

impl RefUnwindSafe for UnpackedChunk

impl Send for UnpackedChunk

impl Sync for UnpackedChunk

impl Unpin for UnpackedChunk

impl UnwindSafe for UnpackedChunk

Blanket Implementations

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

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

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

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]