pub struct Lock { /* private fields */ }Expand description
represent an entry in /proc/locks
There are two method to access the Lock:
- by filed name, these method has the same name as the filed name.
- by column index, correct index if from 0 to 7, wrong index make a panic.
Note: index by column always return String type.
However filed name have different type to return and are not group by column.
Note: access last column by filed is an Option, None stand for EOF. The last column always exist.
Implementations§
Source§impl Lock
impl Lock
pub fn id(&self) -> &usize
pub fn class(&self) -> &String
pub fn mode(&self) -> &String
pub fn rw(&self) -> &String
pub fn pid(&self) -> &usize
pub fn major(&self) -> &usize
pub fn minor(&self) -> &usize
pub fn inode(&self) -> &usize
pub fn start(&self) -> &usize
pub fn end(&self) -> &Option<usize>
pub fn column(&self, index: usize) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Lock
impl RefUnwindSafe for Lock
impl Send for Lock
impl Sync for Lock
impl Unpin for Lock
impl UnwindSafe for Lock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more