Enum freebsd_geom::EdgeMetadata[][src]

pub enum EdgeMetadata {
    DISK {
        fwheads: u64,
        fwsectors: u64,
        rotationrate: u64,
        ident: String,
        lunid: String,
        descr: String,
    },
    PART {
        start: u64,
        end: u64,
        index: u64,
        type_: String,
        offset: u64,
        length: u64,
        label: Option<String>,
        rawtype: Option<String>,
        rawuuid: Option<String>,
        efimedia: Option<String>,
    },
    LABEL {
        index: u64,
        offset: u64,
        length: u64,
        seclength: u64,
        secoffset: u64,
    },
}

Metadata associated with an Edge.

The enum variant depends on the GeomClass of the Geom associated with the “provider” represented by this Edge.

Variants

DISK

EdgeMetadata::DISK is metadata associated with the Edge between a GeomClass::DISK Geom and some lower Geom in the tree.

Fields of DISK

fwheads: u64

Historical: “H” in “CHS geometry”

fwsectors: u64

Historical: “S” in “CHS geometry”

rotationrate: u64

Zero indicates solid-state drives; non-zero represents spinning drives.

ident: String

Serial number, or some other identifier

lunid: String

LUN identifier. Logical Unit Numbers come from SCSI, but are synthesized for other non-SCSI devices in FreeBSD’s CAM.

descr: String

A description. For example, disk make and model.

PART

EdgeMetadata::PART is metadata associated with the Edge between a GeomClass::PART and some lower Geom in the tree.

These edges exist for each partition entry, whereas there is only one PART Geom for the entire partition table.

Fields of PART

start: u64

First LBA of partition entry

end: u64

Last LBA of partition entry

index: u64

Index of partition entry in partition table

type_: String

A canonical FreeBSD GEOM alias for the filesystem type metadata associated with this partition entry. E.g., both MBR 0xef and GPT “C12A7328-F81F-11D2-BA4B-00A0C93EC93B” are mapped to the same alias: G_PART_ALIAS_EFI, or "efi".

The complete list may be found in sys/geom/part/g_part.c in the g_part_alias_list table.

offset: u64

The byte offset of the start of the partition entry

length: u64

The length of the partition entry, in bytes

label: Option<String>

If provided by scheme (e.g., GPT): a label associated with this partition entry

rawtype: Option<String>

If provided by scheme (e.g., GPT, MBR): the raw value that was decoded to the ::type_ alias. String representation varies by the specific scheme implementation.

rawuuid: Option<String>

If provided by scheme (e.g., GPT): a unique identifier (UUID, GUID) for this partition. These are generated randomly when partitions are created, and are unique unless cloned or intentionally duplicated.

efimedia: Option<String>

If provided by scheme (e.g., GPT, MBR): The EFI path to this partition. E.g., HD(1,GPT,12345678-9abc-...,0x80,0xc8) (GPT) or HD(2,MBR,0x12345678,0x100,0x100) (MBR).

LABEL

EdgeMetadata::LABEL is metadata associated with the Edge between a GeomClass::LABEL and some lower Geom in the tree.

It is mostly a vestigial implementation detail of FreeBSD’s LABEL GEOM class.

Fields of LABEL

index: u64

Always zero

offset: u64

Always zero

length: u64

The length of the volume represented by this label, in bytes

seclength: u64

length divided by 512

secoffset: u64

Always zero

Trait Implementations

impl AsRef<str> for EdgeMetadata[src]

impl Debug for EdgeMetadata[src]

impl FromStr for EdgeMetadata[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl IntoEnumIterator for EdgeMetadata[src]

type Iterator = EdgeMetadataIter

Auto Trait Implementations

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

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.