[][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

Fields

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

Methods

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
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

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

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

impl<T> WithSubscriber for T[src]