Struct gio::DataInputStream
source · pub struct DataInputStream { /* private fields */ }
Expand description
Data input stream implements InputStream
and includes functions for
reading structured data directly from a binary input stream.
Properties
byte-order
The :byte-order property determines the byte ordering that is used when reading multi-byte entities (such as integers) from the stream.
Readable | Writeable
newline-type
The :newline-type property determines what is considered as a line ending when reading complete lines from the stream.
Readable | Writeable
FilterInputStream
base-stream
Readable | Writeable | Construct Only
close-base-stream
Readable | Writeable | Construct
Implements
DataInputStreamExt
, BufferedInputStreamExt
, FilterInputStreamExt
, InputStreamExt
, glib::ObjectExt
, SeekableExt
, DataInputStreamExtManual
, InputStreamExtManual
Implementations§
source§impl DataInputStream
impl DataInputStream
pub const NONE: Option<&'static DataInputStream> = None
sourcepub fn new(base_stream: &impl IsA<InputStream>) -> DataInputStream
pub fn new(base_stream: &impl IsA<InputStream>) -> DataInputStream
Creates a new data input stream for the base_stream
.
base_stream
a InputStream
.
Returns
a new DataInputStream
.
sourcepub fn builder() -> DataInputStreamBuilder
pub fn builder() -> DataInputStreamBuilder
Creates a new builder-pattern struct instance to construct DataInputStream
objects.
This method returns an instance of DataInputStreamBuilder
which can be used to create DataInputStream
objects.
Trait Implementations§
source§impl Clone for DataInputStream
impl Clone for DataInputStream
source§impl Debug for DataInputStream
impl Debug for DataInputStream
source§impl Default for DataInputStream
impl Default for DataInputStream
source§impl Display for DataInputStream
impl Display for DataInputStream
source§impl HasParamSpec for DataInputStream
impl HasParamSpec for DataInputStream
type ParamSpec = ParamSpecObject
§type SetValue = DataInputStream
type SetValue = DataInputStream
type BuilderFn = fn(_: &str) -> ParamSpecObjectBuilder<'_, DataInputStream>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for DataInputStream
impl Hash for DataInputStream
source§impl Ord for DataInputStream
impl Ord for DataInputStream
source§impl ParentClassIs for DataInputStream
impl ParentClassIs for DataInputStream
type Parent = BufferedInputStream
source§impl<OT: ObjectType> PartialEq<OT> for DataInputStream
impl<OT: ObjectType> PartialEq<OT> for DataInputStream
source§impl<OT: ObjectType> PartialOrd<OT> for DataInputStream
impl<OT: ObjectType> PartialOrd<OT> for DataInputStream
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for DataInputStream
impl StaticType for DataInputStream
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for DataInputStream
impl IsA<BufferedInputStream> for DataInputStream
impl IsA<FilterInputStream> for DataInputStream
impl IsA<InputStream> for DataInputStream
impl IsA<Seekable> for DataInputStream
Auto Trait Implementations§
impl RefUnwindSafe for DataInputStream
impl !Send for DataInputStream
impl !Sync for DataInputStream
impl Unpin for DataInputStream
impl UnwindSafe for DataInputStream
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<O> BufferedInputStreamExt for Owhere
O: IsA<BufferedInputStream>,
impl<O> BufferedInputStreamExt for Owhere
O: IsA<BufferedInputStream>,
source§fn fill(
&self,
count: isize,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>
fn fill( &self, count: isize, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<isize, Error>
count
bytes from the stream into the buffer.
Will block during this read. Read moresource§fn fill_async<P: FnOnce(Result<isize, Error>) + 'static>(
&self,
count: isize,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn fill_async<P: FnOnce(Result<isize, Error>) + 'static>( &self, count: isize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
fn fill_future( &self, count: isize, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<isize, Error>> + 'static>>
source§fn buffer_size(&self) -> usize
fn buffer_size(&self) -> usize
source§fn peek_buffer(&self) -> Vec<u8>
fn peek_buffer(&self) -> Vec<u8>
source§fn read_byte(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<i32, Error>
fn read_byte( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<i32, Error>
source§fn set_buffer_size(&self, size: usize)
fn set_buffer_size(&self, size: usize)
self
to size
, or to the
size of the contents of the buffer. The buffer can never be resized
smaller than its current contents. Read morefn connect_buffer_size_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
source§impl<T> Cast for Twhere
T: ObjectType,
impl<T> Cast for Twhere
T: ObjectType,
source§fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast<T>(self) -> Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moresource§fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
fn upcast_ref<T>(&self) -> &Twhere
T: ObjectType,
Self: IsA<T>,
T
. Read moresource§fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast<T>(self) -> Result<T, Self>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moresource§fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Self: MayDowncastTo<T>,
T
. Read moresource§fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
fn dynamic_cast<T>(self) -> Result<T, Self>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while upcast
will do many checks at compile-time already. downcast
will
perform the same checks at runtime as dynamic_cast
, but will also ensure some amount of
compile-time safety. Read moresource§fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
fn dynamic_cast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
T
. This handles upcasting, downcasting
and casting between interface and interface implementors. All checks are performed at
runtime, while downcast
and upcast
will do many checks at compile-time already. Read moresource§unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
unsafe fn unsafe_cast<T>(self) -> Twhere
T: ObjectType,
T
unconditionally. Read moresource§unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
unsafe fn unsafe_cast_ref<T>(&self) -> &Twhere
T: ObjectType,
&T
unconditionally. Read moresource§impl<O> DataInputStreamExt for Owhere
O: IsA<DataInputStream>,
impl<O> DataInputStreamExt for Owhere
O: IsA<DataInputStream>,
source§fn byte_order(&self) -> DataStreamByteOrder
fn byte_order(&self) -> DataStreamByteOrder
source§fn newline_type(&self) -> DataStreamNewlineType
fn newline_type(&self) -> DataStreamNewlineType
self
. Read moresource§fn read_byte(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<u8, Error>
fn read_byte( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<u8, Error>
self
. Read moresource§fn read_int16(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<i16, Error>
fn read_int16( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<i16, Error>
self
. Read moresource§fn read_int32(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<i32, Error>
fn read_int32( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<i32, Error>
self
. Read moresource§fn read_int64(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<i64, Error>
fn read_int64( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<i64, Error>
self
. Read moresource§fn read_uint16(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<u16, Error>
fn read_uint16( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<u16, Error>
self
. Read moresource§fn read_uint32(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<u32, Error>
fn read_uint32( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<u32, Error>
self
. Read moresource§fn read_uint64(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<u64, Error>
fn read_uint64( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<u64, Error>
self
. Read moresource§fn set_byte_order(&self, order: DataStreamByteOrder)
fn set_byte_order(&self, order: DataStreamByteOrder)
self
. All subsequent
reads from the self
will be read in the given order
. Read moresource§fn set_newline_type(&self, type_: DataStreamNewlineType)
fn set_newline_type(&self, type_: DataStreamNewlineType)
self
. Read morefn connect_byte_order_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
fn connect_newline_type_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
source§impl<O> DataInputStreamExtManual for Owhere
O: IsA<DataInputStream>,
impl<O> DataInputStreamExtManual for Owhere
O: IsA<DataInputStream>,
source§fn read_line<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<Vec<u8>, Error>
fn read_line<P: IsA<Cancellable>>( &self, cancellable: Option<&P> ) -> Result<Vec<u8>, Error>
source§fn read_line_async<P: IsA<Cancellable>, Q: FnOnce(Result<Vec<u8>, Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
)
fn read_line_async<P: IsA<Cancellable>, Q: FnOnce(Result<Vec<u8>, Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&P>, callback: Q )
read_line()
. It is
an error to have two outstanding calls to this function. Read morefn read_line_future( &self, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Vec<u8>, Error>> + 'static>>
source§fn read_line_utf8<P: IsA<Cancellable>>(
&self,
cancellable: Option<&P>
) -> Result<Option<GString>, Error>
fn read_line_utf8<P: IsA<Cancellable>>( &self, cancellable: Option<&P> ) -> Result<Option<GString>, Error>
fn read_line_utf8_async<P: IsA<Cancellable>, Q: FnOnce(Result<Option<GString>, Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&P>, callback: Q )
fn read_line_utf8_future( &self, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Option<GString>, Error>> + 'static>>
source§fn read_upto<P: IsA<Cancellable>>(
&self,
stop_chars: &[u8],
cancellable: Option<&P>
) -> Result<Vec<u8>, Error>
fn read_upto<P: IsA<Cancellable>>( &self, stop_chars: &[u8], cancellable: Option<&P> ) -> Result<Vec<u8>, Error>
source§fn read_upto_async<P: IsA<Cancellable>, Q: FnOnce(Result<Vec<u8>, Error>) + 'static>(
&self,
stop_chars: &[u8],
io_priority: Priority,
cancellable: Option<&P>,
callback: Q
)
fn read_upto_async<P: IsA<Cancellable>, Q: FnOnce(Result<Vec<u8>, Error>) + 'static>( &self, stop_chars: &[u8], io_priority: Priority, cancellable: Option<&P>, callback: Q )
read_upto()
.
It is an error to have two outstanding calls to this function. Read morefn read_upto_future( &self, stop_chars: &[u8], io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Vec<u8>, Error>> + 'static>>
source§impl<O> FilterInputStreamExt for Owhere
O: IsA<FilterInputStream>,
impl<O> FilterInputStreamExt for Owhere
O: IsA<FilterInputStream>,
source§fn base_stream(&self) -> InputStream
fn base_stream(&self) -> InputStream
source§fn closes_base_stream(&self) -> bool
fn closes_base_stream(&self) -> bool
self
is
closed. Read moresource§fn set_close_base_stream(&self, close_base: bool)
fn set_close_base_stream(&self, close_base: bool)
self
is closed. Read morefn connect_close_base_stream_notify<F: Fn(&Self) + 'static>( &self, f: F ) -> SignalHandlerId
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<O> InputStreamExt for Owhere
O: IsA<InputStream>,
impl<O> InputStreamExt for Owhere
O: IsA<InputStream>,
source§fn clear_pending(&self)
fn clear_pending(&self)
self
.source§fn close(
&self,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
fn close( &self, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>
source§fn close_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn close_async<P: FnOnce(Result<(), Error>) + 'static>( &self, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
callback
will be called.
You can then call g_input_stream_close_finish()
to get the result of the
operation. Read morefn close_future( &self, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
source§fn has_pending(&self) -> bool
fn has_pending(&self) -> bool
source§fn read_bytes(
&self,
count: usize,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<Bytes, Error>
fn read_bytes( &self, count: usize, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<Bytes, Error>
InputStreamExtManual::read()
, this tries to read count
bytes from
the stream in a blocking fashion. However, rather than reading into
a user-supplied buffer, this will create a new glib::Bytes
containing
the data that was read. This may be easier to use from language
bindings. Read moresource§fn read_bytes_async<P: FnOnce(Result<Bytes, Error>) + 'static>(
&self,
count: usize,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn read_bytes_async<P: FnOnce(Result<Bytes, Error>) + 'static>( &self, count: usize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
count
bytes from the stream into a
new glib::Bytes
. When the operation is finished callback
will be
called. You can then call g_input_stream_read_bytes_finish()
to get the
result of the operation. Read morefn read_bytes_future( &self, count: usize, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<Bytes, Error>> + 'static>>
source§fn skip(
&self,
count: usize,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<isize, Error>
fn skip( &self, count: usize, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<isize, Error>
count
bytes from the stream. Will block during the operation. Read moresource§fn skip_async<P: FnOnce(Result<isize, Error>) + 'static>(
&self,
count: usize,
io_priority: Priority,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P
)
fn skip_async<P: FnOnce(Result<isize, Error>) + 'static>( &self, count: usize, io_priority: Priority, cancellable: Option<&impl IsA<Cancellable>>, callback: P )
count
bytes from the stream.
When the operation is finished callback
will be called.
You can then call g_input_stream_skip_finish()
to get the result
of the operation. Read morefn skip_future( &self, count: usize, io_priority: Priority ) -> Pin<Box_<dyn Future<Output = Result<isize, Error>> + 'static>>
source§impl<O> InputStreamExtManual for Owhere
O: IsA<InputStream>,
impl<O> InputStreamExtManual for Owhere
O: IsA<InputStream>,
source§fn read<B: AsMut<[u8]>, C: IsA<Cancellable>>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<usize, Error>
fn read<B: AsMut<[u8]>, C: IsA<Cancellable>>( &self, buffer: B, cancellable: Option<&C> ) -> Result<usize, Error>
count
bytes from the stream into the buffer starting at
buffer
. Will block during this read. Read moresource§fn read_all<B: AsMut<[u8]>, C: IsA<Cancellable>>(
&self,
buffer: B,
cancellable: Option<&C>
) -> Result<(usize, Option<Error>), Error>
fn read_all<B: AsMut<[u8]>, C: IsA<Cancellable>>( &self, buffer: B, cancellable: Option<&C> ) -> Result<(usize, Option<Error>), Error>
count
bytes from the stream into the buffer starting at
buffer
. Will block during this read. Read moresource§fn read_all_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + 'static, C: IsA<Cancellable>>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
)
fn read_all_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize, Option<Error>), (B, Error)>) + 'static, C: IsA<Cancellable>>( &self, buffer: B, io_priority: Priority, cancellable: Option<&C>, callback: Q )
count
bytes from the stream into the
buffer starting at buffer
. Read moresource§fn read_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + 'static, C: IsA<Cancellable>>(
&self,
buffer: B,
io_priority: Priority,
cancellable: Option<&C>,
callback: Q
)
fn read_async<B: AsMut<[u8]> + Send + 'static, Q: FnOnce(Result<(B, usize), (B, Error)>) + 'static, C: IsA<Cancellable>>( &self, buffer: B, io_priority: Priority, cancellable: Option<&C>, callback: Q )
count
bytes from the stream into the buffer
starting at buffer
. When the operation is finished callback
will be called.
You can then call g_input_stream_read_finish()
to get the result of the
operation. Read morefn read_all_future<B: AsMut<[u8]> + Send + 'static>( &self, buffer: B, io_priority: Priority ) -> Pin<Box<dyn Future<Output = Result<(B, usize, Option<Error>), (B, Error)>> + 'static>>
fn read_future<B: AsMut<[u8]> + Send + 'static>( &self, buffer: B, io_priority: Priority ) -> Pin<Box<dyn Future<Output = Result<(B, usize), (B, Error)>> + 'static>>
fn into_read(self) -> InputStreamRead<Self> ⓘwhere
Self: IsA<InputStream>,
fn into_async_buf_read(
self,
buffer_size: usize
) -> InputStreamAsyncBufRead<Self>where
Self: IsA<InputStream>,
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
impl<U> IsSubclassableExt for Uwhere
U: IsClass + ParentClassIs,
fn parent_class_init<T>(class: &mut Class<U>)
fn parent_instance_init<T>(instance: &mut InitializingObject<T>)
source§impl<T> ObjectExt for Twhere
T: ObjectType,
impl<T> ObjectExt for Twhere
T: ObjectType,
source§fn is<U>(&self) -> boolwhere
U: StaticType,
fn is<U>(&self) -> boolwhere
U: StaticType,
true
if the object is an instance of (can be cast to) T
.source§fn object_class(&self) -> &Class<Object>
fn object_class(&self) -> &Class<Object>
ObjectClass
of the object. Read moresource§fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
fn class_of<U>(&self) -> Option<&Class<U>>where
U: IsClass,
T
. Read moresource§fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
fn interface<U>(&self) -> Option<InterfaceRef<'_, U>>where
U: IsInterface,
T
of the object. Read moresource§fn set_property_from_value(&self, property_name: &str, value: &Value)
fn set_property_from_value(&self, property_name: &str, value: &Value)
source§fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
fn set_properties(&self, property_values: &[(&str, &dyn ToValue)])
source§fn set_properties_from_value(&self, property_values: &[(&str, Value)])
fn set_properties_from_value(&self, property_values: &[(&str, Value)])
source§fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
fn property<V>(&self, property_name: &str) -> Vwhere
V: for<'b> FromValue<'b> + 'static,
property_name
of the object and cast it to the type V. Read moresource§fn property_value(&self, property_name: &str) -> Value
fn property_value(&self, property_name: &str) -> Value
property_name
of the object. Read moresource§fn property_type(&self, property_name: &str) -> Option<Type>
fn property_type(&self, property_name: &str) -> Option<Type>
property_name
of this object. Read moresource§fn find_property(&self, property_name: &str) -> Option<ParamSpec>
fn find_property(&self, property_name: &str) -> Option<ParamSpec>
ParamSpec
of the property property_name
of this object.source§fn list_properties(&self) -> PtrSlice<ParamSpec>
fn list_properties(&self) -> PtrSlice<ParamSpec>
ParamSpec
of the properties of this object.source§fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
fn freeze_notify(&self) -> PropertyNotificationFreezeGuard
source§unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
unsafe fn set_qdata<QD>(&self, key: Quark, value: QD)where
QD: 'static,
key
. Read moresource§unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn qdata<QD>(&self, key: Quark) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moresource§unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
unsafe fn steal_qdata<QD>(&self, key: Quark) -> Option<QD>where
QD: 'static,
key
. Read moresource§unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
unsafe fn set_data<QD>(&self, key: &str, value: QD)where
QD: 'static,
key
. Read moresource§unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
unsafe fn data<QD>(&self, key: &str) -> Option<NonNull<QD>>where
QD: 'static,
key
. Read moresource§unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
unsafe fn steal_data<QD>(&self, key: &str) -> Option<QD>where
QD: 'static,
key
. Read moresource§fn block_signal(&self, handler_id: &SignalHandlerId)
fn block_signal(&self, handler_id: &SignalHandlerId)
source§fn unblock_signal(&self, handler_id: &SignalHandlerId)
fn unblock_signal(&self, handler_id: &SignalHandlerId)
source§fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
fn stop_signal_emission(&self, signal_id: SignalId, detail: Option<Quark>)
source§fn stop_signal_emission_by_name(&self, signal_name: &str)
fn stop_signal_emission_by_name(&self, signal_name: &str)
source§fn connect<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerId
fn connect<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerId
fn connect_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn connect_local<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerId
fn connect_local<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_local_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerId
fn connect_local_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
signal_id
on this object. Read moresource§unsafe fn connect_unsafe<F>(
&self,
signal_name: &str,
after: bool,
callback: F
) -> SignalHandlerId
unsafe fn connect_unsafe<F>( &self, signal_name: &str, after: bool, callback: F ) -> SignalHandlerId
signal_name
on this object. Read moresource§unsafe fn connect_unsafe_id<F>(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
callback: F
) -> SignalHandlerId
unsafe fn connect_unsafe_id<F>( &self, signal_id: SignalId, details: Option<Quark>, after: bool, callback: F ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn connect_closure(
&self,
signal_name: &str,
after: bool,
closure: RustClosure
) -> SignalHandlerId
fn connect_closure( &self, signal_name: &str, after: bool, closure: RustClosure ) -> SignalHandlerId
signal_name
on this object. Read moresource§fn connect_closure_id(
&self,
signal_id: SignalId,
details: Option<Quark>,
after: bool,
closure: RustClosure
) -> SignalHandlerId
fn connect_closure_id( &self, signal_id: SignalId, details: Option<Quark>, after: bool, closure: RustClosure ) -> SignalHandlerId
signal_id
on this object. Read moresource§fn watch_closure(&self, closure: &impl AsRef<Closure>)
fn watch_closure(&self, closure: &impl AsRef<Closure>)
closure
to the lifetime of the object. When
the object’s reference count drops to zero, the closure will be
invalidated. An invalidated closure will ignore any calls to
invoke_with_values
, or
invoke
when using Rust closures.source§fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit<R>(&self, signal_id: SignalId, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
fn emit_with_values(&self, signal_id: SignalId, args: &[Value]) -> Option<Value>
Self::emit
but takes Value
for the arguments.source§fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name<R>(&self, signal_name: &str, args: &[&dyn ToValue]) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_by_name_with_values(
&self,
signal_name: &str,
args: &[Value]
) -> Option<Value>
fn emit_by_name_with_values( &self, signal_name: &str, args: &[Value] ) -> Option<Value>
source§fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_by_name_with_details<R>(
&self,
signal_name: &str,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_by_name_with_details_and_values(
&self,
signal_name: &str,
details: Quark,
args: &[Value]
) -> Option<Value>
fn emit_by_name_with_details_and_values( &self, signal_name: &str, details: Quark, args: &[Value] ) -> Option<Value>
source§fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
fn emit_with_details<R>(
&self,
signal_id: SignalId,
details: Quark,
args: &[&dyn ToValue]
) -> Rwhere
R: TryFromClosureReturnValue,
source§fn emit_with_details_and_values(
&self,
signal_id: SignalId,
details: Quark,
args: &[Value]
) -> Option<Value>
fn emit_with_details_and_values( &self, signal_id: SignalId, details: Quark, args: &[Value] ) -> Option<Value>
source§fn disconnect(&self, handler_id: SignalHandlerId)
fn disconnect(&self, handler_id: SignalHandlerId)
source§fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moresource§fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
fn connect_notify_local<F>(&self, name: Option<&str>, f: F) -> SignalHandlerId
notify
signal of the object. Read moresource§unsafe fn connect_notify_unsafe<F>(
&self,
name: Option<&str>,
f: F
) -> SignalHandlerId
unsafe fn connect_notify_unsafe<F>( &self, name: Option<&str>, f: F ) -> SignalHandlerId
notify
signal of the object. Read moresource§fn notify(&self, property_name: &str)
fn notify(&self, property_name: &str)
source§fn notify_by_pspec(&self, pspec: &ParamSpec)
fn notify_by_pspec(&self, pspec: &ParamSpec)
source§fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
fn add_weak_ref_notify<F>(&self, f: F) -> WeakRefNotify<T>
source§fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
fn add_weak_ref_notify_local<F>(&self, f: F) -> WeakRefNotify<T>where
F: FnOnce() + 'static,
source§fn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
fn bind_property<'f, 't, O, 'a>(
&'a self,
source_property: &'a str,
target: &'a O,
target_property: &'a str
) -> BindingBuilder<'a, 'f, 't>where
O: ObjectType,
source§unsafe fn run_dispose(&self)
unsafe fn run_dispose(&self)
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<O> SeekableExt for O
impl<O> SeekableExt for O
source§fn can_truncate(&self) -> bool
fn can_truncate(&self) -> bool
truncate()
. Read moresource§fn seek(
&self,
offset: i64,
type_: SeekType,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
fn seek( &self, offset: i64, type_: SeekType, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>
source§fn truncate(
&self,
offset: i64,
cancellable: Option<&impl IsA<Cancellable>>
) -> Result<(), Error>
fn truncate( &self, offset: i64, cancellable: Option<&impl IsA<Cancellable>> ) -> Result<(), Error>
offset
. If the stream was previously
larger than offset
, the extra data is discarded. If the stream was
previously shorter than offset
, it is extended with NUL (‘\0’) bytes. Read more