[][src]Struct asuran::repository::backend::common::segment::Header

pub struct Header {
    magic_number: [u8; 8],
    implementation_uuid: [u8; 16],
    major: u16,
    minor: u16,
    patch: u16,

Representation of the header at the start of each file

Designed to be bincoded directly into a spec compliant format with big endian set


magic_number: [u8; 8]implementation_uuid: [u8; 16]major: u16minor: u16patch: u16


impl Header[src]

pub fn new() -> Header[src]

Creates a new segment header with correct values for this version of libasuran

pub fn validate(&self) -> bool[src]

Checks if a header is valid for this version of libasuran

Currently only checks the header

pub fn uuid(&self) -> Uuid[src]

Returns the implementation UUID

pub fn version_string(&self) -> String[src]

Reconstructs the version string

Trait Implementations

impl Clone for Header[src]

impl Copy for Header[src]

impl Debug for Header[src]

impl Default for Header[src]

fn default() -> Header[src]

Constructs a header using the correct values for this version of libasuran

impl<'de> Deserialize<'de> for Header[src]

impl Eq for Header[src]

impl PartialEq<Header> for Header[src]

impl Serialize for Header[src]

impl StructuralEq for Header[src]

impl StructuralPartialEq for Header[src]

Auto Trait Implementations

impl RefUnwindSafe for Header

impl Send for Header

impl Sync for Header

impl Unpin for Header

impl UnwindSafe for Header

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> DeserializeOwned for T where
    T: Deserialize<'de>, 

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?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> ToOwned for T where
    T: Clone

type Owned = T

The resulting type after obtaining ownership.

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]