pub struct SemHandle { /* private fields */ }Implementations§
Source§impl SemHandle
impl SemHandle
pub fn create( name: &str, value: u32, unlink: bool, ) -> Result<(Self, Option<String>), SemError>
pub fn open_existing(name: &str) -> Result<Self, SemError>
pub fn as_handle_int(&self) -> isize
Sourcepub const unsafe fn from_raw(raw: *mut sem_t) -> Self
pub const unsafe fn from_raw(raw: *mut sem_t) -> Self
Rebuild a handle from the integer a SemLock stored.
§Safety
raw must be a live sem_open handle. Drop closes it, so a
caller that still owns that close must forget this value.
pub fn trywait(&self) -> TryAcquireStatus
pub fn post(&self) -> Result<(), SemError>
pub fn wait(&self, deadline: Option<&Deadline>) -> WaitStatus
pub fn value(&self) -> Result<i32, SemError>
Trait Implementations§
impl Send for SemHandle
Available on Unix only.
impl Sync for SemHandle
Available on Unix only.
Auto Trait Implementations§
impl Freeze for SemHandle
impl RefUnwindSafe for SemHandle
impl Unpin for SemHandle
impl UnsafeUnpin for SemHandle
impl UnwindSafe for SemHandle
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