[−][src]Struct heliograph::Key
Key, used for referencing a semaphore: two semaphores built with the same key will be the same
Implementations
impl Key
[src]
pub fn new(path: &Path, id: NonZeroU8) -> Result<Key>
[src]
Compute a key from a path and an id
The path is not taken as is, and two paths referring to the same file will create the same key.
pub fn new_fd(fd: RawFd, id: NonZeroU8) -> Result<Key>
[src]
Compute a key from an fd and an id
This is similar to new
, but is to be used when the file is
already open. It also works on things like memory fd's used
for shared memory, etc.
pub fn private() -> Key
[src]
The private key, that always will create a new semaphore with no way to create another reference to it
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Key
[src]
impl Send for Key
[src]
impl Sync for Key
[src]
impl Unpin for Key
[src]
impl UnwindSafe for Key
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,