Struct devicemapper::Device [−][src]
A struct containing the device's major and minor numbers
Also allows conversion to/from a single 64bit dev_t value.
Fields
major: u32
Device major number
minor: u32
Device minor number
Methods
impl Device
[src]
impl Device
The Linux kernel's kdev_t encodes major/minor values as mmmM MMmm.
pub fn from_kdev_t(val: u32) -> Device
[src]
pub fn from_kdev_t(val: u32) -> Device
Make a Device from a kdev_t.
pub fn to_kdev_t(self) -> Option<u32>
[src]
pub fn to_kdev_t(self) -> Option<u32>
Convert to a kdev_t. Return None if values are not expressible as a kdev_t.
Trait Implementations
impl Debug for Device
[src]
impl Debug for Device
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Device
[src]
impl PartialEq for Device
fn eq(&self, other: &Device) -> bool
[src]
fn eq(&self, other: &Device) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Device) -> bool
[src]
fn ne(&self, other: &Device) -> bool
This method tests for !=
.
impl Eq for Device
[src]
impl Eq for Device
impl Clone for Device
[src]
impl Clone for Device
fn clone(&self) -> Device
[src]
fn clone(&self) -> Device
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Device
[src]
impl Copy for Device
impl Hash for Device
[src]
impl Hash for Device
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Device
[src]
impl Display for Device
Display format is the device number in "
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for Device
[src]
impl FromStr for Device
type Err = DmError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Device, DmError>
[src]
fn from_str(s: &str) -> Result<Device, DmError>
Parses a string s
to return a value of this type. Read more
impl From<dev_t> for Device
[src]
impl From<dev_t> for Device
impl From<Device> for dev_t
[src]
impl From<Device> for dev_t