Struct btlib::BlockMetaSecrets

source ·
pub struct BlockMetaSecrets {
    pub block_id: BlockId,
    pub mode: u32,
    pub uid: u32,
    pub gid: u32,
    pub atime: Epoch,
    pub mtime: Epoch,
    pub ctime: Epoch,
    pub size: u64,
    pub nlink: u32,
    pub sect_sz: u64,
    pub tags: BTreeMap<String, Vec<u8>>,
}
Expand description

Metadata that is encrypted.

Fields§

§block_id: BlockId

The identifier for the block these secrets are for.

§mode: u32

Mode of file.

§uid: u32

Owner UID of file.

§gid: u32

Owner GID of file.

§atime: Epoch

Last access time.

§mtime: Epoch

Last data modification.

§ctime: Epoch

Last status change.

§size: u64

Size of the file in bytes.

§nlink: u32

Number of hard links to the file.

§sect_sz: u64

The sector size used by the block.

§tags: BTreeMap<String, Vec<u8>>

User controlled metadata.

Implementations§

source§

impl BlockMetaSecrets

source

pub fn new() -> BlockMetaSecrets

source

pub fn attr(&self) -> Result<Attr>

source

pub fn stat(&self) -> Result<stat64>

source

pub fn sectors(&self) -> u64

Returns the number of sectors occupied by the block’s data.

source

pub fn block_id(&self) -> &BlockId

source

pub fn sector_sz(&self) -> u64

Trait Implementations§

source§

impl AsRef<BlockId> for BlockMetaSecrets

source§

fn as_ref(&self) -> &BlockId

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Clone for BlockMetaSecrets

source§

fn clone(&self) -> BlockMetaSecrets

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for BlockMetaSecrets

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for BlockMetaSecrets

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for BlockMetaSecrets

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Hash for BlockMetaSecrets

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq<BlockMetaSecrets> for BlockMetaSecrets

source§

fn eq(&self, other: &BlockMetaSecrets) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for BlockMetaSecrets

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<&BlockMetaSecrets> for Attr

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: &BlockMetaSecrets) -> Result<Self>

Performs the conversion.
source§

impl Eq for BlockMetaSecrets

source§

impl StructuralEq for BlockMetaSecrets

source§

impl StructuralPartialEq for BlockMetaSecrets

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Free for T

§

unsafe default fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,