Struct futures_glib::IoChannel [] [src]

pub struct IoChannel { /* fields omitted */ }

Wrapper around the underlying glib GIOChannel type

Methods

impl IoChannel
[src]

[src]

[src]

Gets the internal buffer size.

[src]

Sets the buffer size.

If 0, then glib will pick a good size.

[src]

Returns whether this channel is buffered.

[src]

Sets whether this channel is buffered or not.

The buffering state can only be set if the channel's encoding is null. For any other encoding, the channel must be buffered.

A buffered channel can only be set unbuffered if the channel's internal buffers have been flushed. Newly created channels or channels which have returned G_IO_STATUS_EOF don't require such a flush. For write-only channels, a call to `flush is sufficient. Note that this means that socket-based channels cannot be set unbuffered once they have had data read from them.

The default state of the channel is buffered.

[src]

Returns whether the file/socket/whatever associated with channel will be closed when channel receives its final unref and is destroyed.

The default value of this is true for channels created by g_io_channel_new_file(), and false for all other channels.

[src]

Sets whether this channel will close the underlying I/O object whent he last reference goes out of scope.

Setting this flag to true for a channel you have already closed can cause problems.

[src]

Close an IO channel.

Any pending data to be written will be flushed if flush is true. The channel will not be freed until the last reference is dropped.

[src]

Creates a Source that's dispatched when condition is met for the given channel. For example, if condition is G_IO_IN, the source will be dispatched when there's data available for reading.

On Windows, polling a Source created to watch a channel for a socket puts the socket in non-blocking mode. This is a side-effect of the implementation and unavoidable.

[src]

Gets the encoding for the input/output of the channel.

The internal encoding is always UTF-8. The encoding None makes the channel safe for binary data.

[src]

Sets the encoding for the input/output of the channel. The internal encoding is always UTF-8. The default encoding for the external file is UTF-8.

The encoding None is safe to use with binary data.

Trait Implementations

impl AsRawFd for IoChannel
[src]

[src]

Extracts the raw file descriptor. Read more

impl Read for IoChannel
[src]

[src]

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

[src]

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. Read more

1.0.0
[src]

Read all bytes until EOF in this source, placing them into buf. Read more

1.0.0
[src]

Read all bytes until EOF in this source, appending them to buf. Read more

1.6.0
[src]

Read the exact number of bytes required to fill buf. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Read. Read more

1.0.0
[src]

Transforms this Read instance to an [Iterator] over its bytes. Read more

[src]

🔬 This is a nightly-only experimental API. (io)

the semantics of a partial read/write of where errors happen is currently unclear and may change

Transforms this Read instance to an [Iterator] over [char]s. Read more

1.0.0
[src]

Creates an adaptor which will chain this stream with another. Read more

1.0.0
[src]

Creates an adaptor which will read at most limit bytes from it. Read more

impl<'a> Read for &'a IoChannel
[src]

[src]

Pull some bytes from this source into the specified buffer, returning how many bytes were read. Read more

[src]

🔬 This is a nightly-only experimental API. (read_initializer)

Determines if this Reader can work with buffers of uninitialized memory. Read more

1.0.0
[src]

Read all bytes until EOF in this source, placing them into buf. Read more

1.0.0
[src]

Read all bytes until EOF in this source, appending them to buf. Read more

1.6.0
[src]

Read the exact number of bytes required to fill buf. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Read. Read more

1.0.0
[src]

Transforms this Read instance to an [Iterator] over its bytes. Read more

[src]

🔬 This is a nightly-only experimental API. (io)

the semantics of a partial read/write of where errors happen is currently unclear and may change

Transforms this Read instance to an [Iterator] over [char]s. Read more

1.0.0
[src]

Creates an adaptor which will chain this stream with another. Read more

1.0.0
[src]

Creates an adaptor which will read at most limit bytes from it. Read more

impl Write for IoChannel
[src]

[src]

Write a buffer into this object, returning how many bytes were written. Read more

[src]

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

1.0.0
[src]

Attempts to write an entire buffer into this write. Read more

1.0.0
[src]

Writes a formatted string into this writer, returning any error encountered. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Write. Read more

impl<'a> Write for &'a IoChannel
[src]

[src]

Write a buffer into this object, returning how many bytes were written. Read more

[src]

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

1.0.0
[src]

Attempts to write an entire buffer into this write. Read more

1.0.0
[src]

Writes a formatted string into this writer, returning any error encountered. Read more

1.0.0
[src]

Creates a "by reference" adaptor for this instance of Write. Read more

impl From<TcpStream> for IoChannel
[src]

Important traits for IoChannel
[src]

Performs the conversion.

impl Clone for IoChannel
[src]

Important traits for IoChannel
[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for IoChannel
[src]

[src]

Executes the destructor for this type. Read more

Auto Trait Implementations

impl !Send for IoChannel

impl !Sync for IoChannel