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 DeviceThe 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) -> DeviceMake 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 Devicefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Device[src]
impl PartialEq for Devicefn eq(&self, other: &Device) -> bool[src]
fn eq(&self, other: &Device) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for Device[src]
impl Eq for Deviceimpl Clone for Device[src]
impl Clone for Devicefn clone(&self) -> Device[src]
fn clone(&self) -> DeviceReturns 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 Deviceimpl Hash for Device[src]
impl Hash for Devicefn 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 DeviceDisplay format is the device number in "
fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl FromStr for Device[src]
impl FromStr for Devicetype 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 Deviceimpl From<Device> for dev_t[src]
impl From<Device> for dev_t