pub struct UtsName(/* private fields */);Expand description
Wrapper for libc::utsname with safe accessor methods
Implementations§
Source§impl UtsName
impl UtsName
Sourcepub fn uname() -> Result<Self, Error>
pub fn uname() -> Result<Self, Error>
Calls uname syscall and returns a UtsName wrapper
§Errors
Returns an error if the uname syscall fails
pub const fn nodename(&self) -> &CStr
pub const fn sysname(&self) -> &CStr
pub const fn release(&self) -> &CStr
pub const fn machine(&self) -> &CStr
Auto Trait Implementations§
impl Freeze for UtsName
impl RefUnwindSafe for UtsName
impl Send for UtsName
impl Sync for UtsName
impl Unpin for UtsName
impl UnwindSafe for UtsName
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