Skip to main content

IdentifyNamespace

Struct IdentifyNamespace 

Source
pub struct IdentifyNamespace { /* private fields */ }
Expand description

Decoded Identify Namespace (CNS 00h) data structure.

Implementations§

Source§

impl IdentifyNamespace

Source

pub fn size_lbas(&self) -> u64

Namespace size in logical blocks (NSZE).

Source

pub fn capacity_lbas(&self) -> u64

Namespace capacity in logical blocks (NCAP).

Source

pub fn utilization_lbas(&self) -> u64

Namespace utilization in logical blocks (NUSE).

Source

pub fn features(&self) -> u8

Namespace features bitfield (NSFEAT).

Source

pub fn num_lba_formats(&self) -> u8

Number of supported LBA formats, zero-based (NLBAF).

Source

pub fn formatted_lba_size(&self) -> u8

Formatted LBA Size byte (FLBAS) — encodes which LBA format is active in the lower 4 bits (combined with NULBAF bits for extended encoding).

Source

pub fn metadata_capabilities(&self) -> u8

Metadata Capabilities bitfield (MC).

Source

pub fn data_protection_capabilities(&self) -> u8

End-to-end Data Protection Capabilities (DPC).

Source

pub fn data_protection_setting(&self) -> u8

End-to-end Data Protection Type Settings (DPS).

Source

pub fn multipath_capabilities(&self) -> u8

Namespace Multi-path I/O and Namespace Sharing Capabilities (NMIC).

Source

pub fn reservation_capabilities(&self) -> u8

Reservation Capabilities bitfield (RESCAP).

Source

pub fn nvm_capacity_bytes(&self) -> u128

NVM Capacity in bytes (NVMCAP), 128-bit little-endian.

Source

pub fn atomic_write_unit_normal(&self) -> u16

Namespace Atomic Write Unit Normal (NAWUN), in LBAs minus one.

Source

pub fn nguid(&self) -> [u8; 16]

128-bit Namespace Globally Unique Identifier.

Source

pub fn eui64(&self) -> [u8; 8]

64-bit IEEE Extended Unique Identifier.

Source

pub fn lba_format(&self, index: u8) -> Option<LbaFormat>

Look up an LBA format by index. Returns None if index is out of range (>= 64) or the format slot is unsupported (data_size_bytes == 0).

Source

pub fn current_lba_format(&self) -> Option<LbaFormat>

Active LBA format, as selected by the low bits of flbas.

Trait Implementations§

Source§

impl Debug for IdentifyNamespace

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. 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 T
where 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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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 T
where U: TryFrom<T>,

Source§

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.