[][src]Struct heliograph::Key

pub struct Key { /* fields omitted */ }

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

impl Clone for Key[src]

impl Copy for Key[src]

impl Debug for Key[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.