[]Struct gio::UnixInputStream

pub struct UnixInputStream(_, _);

UnixInputStream implements InputStream for reading from a UNIX file descriptor, including asynchronous operations. (If the file descriptor refers to a socket or pipe, this will use poll to do asynchronous I/O. If it refers to a regular file, it will fall back to doing asynchronous I/O in another thread.)

Note that <gio/gunixinputstream.h> belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc pkg-config file when using it.

Implements

UnixInputStreamExt, InputStreamExt, glib::object::ObjectExt, PollableInputStreamExt, UnixInputStreamExtManual, InputStreamExtManual, PollableInputStreamExtManual

Implementations

impl UnixInputStream[src]

pub unsafe fn new<T: IntoRawFd>(fd: T) -> UnixInputStream[src]

Creates a new UnixInputStream for the given fd.

If close_fd is true, the file descriptor will be closed when the stream is closed.

fd

a UNIX file descriptor

close_fd

true to close the file descriptor when done

Returns

a new UnixInputStream

Safety

If close_fd is false then the caller is responsible for dealing with the fd once the UnixInputStream is cleaned up. It is important that the caller not close the fd before then. If close_fd is true then instead the caller must not close the fd as the UnixInputStream has taken ownership of it and ideally the caller must not do any direct operations on fd at all subsequent to calling this function.

Trait Implementations

impl AsRawFd for UnixInputStream[src]

impl Clone for UnixInputStream

impl Debug for UnixInputStream

impl Display for UnixInputStream[src]

impl Eq for UnixInputStream

impl Hash for UnixInputStream

impl IsA<InputStream> for UnixInputStream

impl IsA<PollableInputStream> for UnixInputStream

impl Ord for UnixInputStream

impl<T: ObjectType> PartialEq<T> for UnixInputStream

impl<T: ObjectType> PartialOrd<T> for UnixInputStream

impl StaticType for UnixInputStream

Auto Trait Implementations

impl RefUnwindSafe for UnixInputStream

impl !Send for UnixInputStream

impl !Sync for UnixInputStream

impl Unpin for UnixInputStream

impl UnwindSafe for UnixInputStream

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<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

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

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

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

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.