#[repr(C)]pub struct _GPollableOutputStreamInterface {
pub g_iface: GTypeInterface,
pub can_poll: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream) -> gboolean>,
pub is_writable: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream) -> gboolean>,
pub create_source: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream, cancellable: *mut GCancellable) -> *mut GSource>,
pub write_nonblocking: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream, buffer: *const c_void, count: gsize, error: *mut *mut GError) -> gssize>,
pub writev_nonblocking: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream, vectors: *const GOutputVector, n_vectors: gsize, bytes_written: *mut gsize, error: *mut *mut GError) -> GPollableReturn>,
}
Expand description
GPollableOutputStreamInterface: @g_iface: The parent interface. @can_poll: Checks if the #GPollableOutputStream instance is actually pollable @is_writable: Checks if the stream is writable @create_source: Creates a #GSource to poll the stream @write_nonblocking: Does a non-blocking write or returns %G_IO_ERROR_WOULD_BLOCK @writev_nonblocking: Does a vectored non-blocking write, or returns %G_POLLABLE_RETURN_WOULD_BLOCK
The interface for pollable output streams.
The default implementation of @can_poll always returns %TRUE.
The default implementation of @write_nonblocking calls g_pollable_output_stream_is_writable(), and then calls g_output_stream_write() if it returns %TRUE. This means you only need to override it if it is possible that your @is_writable implementation may return %TRUE when the stream is not actually writable.
The default implementation of @writev_nonblocking calls g_pollable_output_stream_write_nonblocking() for each vector, and converts its return value and error (if set) to a #GPollableReturn. You should override this where possible to avoid having to allocate a #GError to return %G_IO_ERROR_WOULD_BLOCK.
Since: 2.28
Fields§
§g_iface: GTypeInterface
§can_poll: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream) -> gboolean>
§is_writable: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream) -> gboolean>
§create_source: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream, cancellable: *mut GCancellable) -> *mut GSource>
§write_nonblocking: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream, buffer: *const c_void, count: gsize, error: *mut *mut GError) -> gssize>
§writev_nonblocking: Option<unsafe extern "C" fn(stream: *mut GPollableOutputStream, vectors: *const GOutputVector, n_vectors: gsize, bytes_written: *mut gsize, error: *mut *mut GError) -> GPollableReturn>
Trait Implementations§
Source§impl Clone for _GPollableOutputStreamInterface
impl Clone for _GPollableOutputStreamInterface
Source§fn clone(&self) -> _GPollableOutputStreamInterface
fn clone(&self) -> _GPollableOutputStreamInterface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq for _GPollableOutputStreamInterface
impl PartialEq for _GPollableOutputStreamInterface
Source§fn eq(&self, other: &_GPollableOutputStreamInterface) -> bool
fn eq(&self, other: &_GPollableOutputStreamInterface) -> bool
self
and other
values to be equal, and is used by ==
.