[][src]Struct namaste::Namaste

pub struct Namaste { /* fields omitted */ }

Namaste

  • Required features: abstract-linux-sockets.

Usage

You can call make() and pass your ID to that function. When done, simply drop it via drop().

Notes

  • This struct uses Linux's abstract sockets underneath (see man 7 unix for details).
  • After successfully made, it keeps a socket file descriptor inside. When the struct is being dropped, it tries to close that file descriptor, and prints out errors to stderr, if any.
  • No compilation limit is placed on this truct. But it has only been tested on Linux. Compilations on other platforms such as Windows, macOS... are not tested yet.
  • Functionalities have only been tested on Linux.
  • Currently, std::os::unix::net does not (yet) support abstract sockets. If support would be added, this implementation would likely to be switched to using that, instead of libc.

Methods

impl Namaste[src]

pub unsafe fn make(id: Id) -> Result<Self>[src]

Makes new instance

An error is returned if calling to functions in libc fails. Currently, error kind is simply Other. Error message will contain the original libc function name, function's error code and possible errno.

Trait Implementations

impl PartialEq<Namaste> for Namaste[src]

impl Drop for Namaste[src]

impl Eq for Namaste[src]

impl Hash for Namaste[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Namaste[src]

Auto Trait Implementations

impl Sync for Namaste

impl Send for Namaste

impl Unpin for Namaste

impl RefUnwindSafe for Namaste

impl UnwindSafe for Namaste

Blanket Implementations

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

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

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.

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

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

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