[−][src]Struct namaste::Namaste
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 oflibc
.
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<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
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]
U: From<T>,
impl<T> From<T> for 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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,