gio::prelude

Trait MemoryOutputStreamExt

Source
pub trait MemoryOutputStreamExt:
    IsA<MemoryOutputStream>
    + Sealed
    + 'static {
    // Provided methods
    fn data_size(&self) -> usize { ... }
    fn steal_as_bytes(&self) -> Bytes { ... }
    fn connect_data_size_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing all MemoryOutputStream methods.

§Implementors

MemoryOutputStream

Provided Methods§

Source

fn data_size(&self) -> usize

Returns the number of bytes from the start up to including the last byte written in the stream that has not been truncated away.

§Returns

the number of bytes written to the stream

Source

fn steal_as_bytes(&self) -> Bytes

Returns data from the @self as a #GBytes. @self must be closed before calling this function.

§Returns

the stream’s data

Source

fn connect_data_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§