gi-gio-2.0.25: Gio bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.MemoryInputStream

Contents

Description

tMemoryInputStream is a class for using arbitrary memory chunks as input for GIO streaming input operations.

As of GLib 2.34, tMemoryInputStream implements tPollableInputStream.

Synopsis

Exported types

newtype MemoryInputStream Source #

Memory-managed wrapper type.

Constructors

MemoryInputStream (ManagedPtr MemoryInputStream) 
Instances
Eq MemoryInputStream Source # 
Instance details

Defined in GI.Gio.Objects.MemoryInputStream

GObject MemoryInputStream Source # 
Instance details

Defined in GI.Gio.Objects.MemoryInputStream

Methods

gobjectType :: IO GType

IsGValue MemoryInputStream Source #

Convert MemoryInputStream to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.MemoryInputStream

Methods

toGValue :: MemoryInputStream -> IO GValue

fromGValue :: GValue -> IO MemoryInputStream

HasParentTypes MemoryInputStream Source # 
Instance details

Defined in GI.Gio.Objects.MemoryInputStream

type ParentTypes MemoryInputStream Source # 
Instance details

Defined in GI.Gio.Objects.MemoryInputStream

type ParentTypes MemoryInputStream = InputStream ': (Object ': (PollableInputStream ': (Seekable ': ([] :: [Type]))))

class (GObject o, IsDescendantOf MemoryInputStream o) => IsMemoryInputStream o Source #

Type class for types which can be safely cast to MemoryInputStream, for instance with toMemoryInputStream.

Instances
(GObject o, IsDescendantOf MemoryInputStream o) => IsMemoryInputStream o Source # 
Instance details

Defined in GI.Gio.Objects.MemoryInputStream

toMemoryInputStream :: (MonadIO m, IsMemoryInputStream o) => o -> m MemoryInputStream Source #

Cast to MemoryInputStream, for types for which this is known to be safe. For general casts, use castTo.

noMemoryInputStream :: Maybe MemoryInputStream Source #

A convenience alias for Nothing :: Maybe MemoryInputStream.

Methods

Overloaded methods

addBytes

memoryInputStreamAddBytes Source #

Arguments

:: (HasCallStack, MonadIO m, IsMemoryInputStream a) 
=> a

stream: a tMemoryInputStream

-> Bytes

bytes: input data

-> m () 

Appends bytes to data that can be read from the input stream.

Since: 2.34

addData

memoryInputStreamAddData Source #

Arguments

:: (HasCallStack, MonadIO m, IsMemoryInputStream a) 
=> a

stream: a tMemoryInputStream

-> ByteString

data: input data

-> Maybe DestroyNotify

destroy: function that is called to free data, or Nothing

-> m () 

Appends data to data that can be read from the input stream

new

memoryInputStreamNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> m MemoryInputStream

Returns: a new tInputStream

Creates a new empty tMemoryInputStream.

newFromBytes

memoryInputStreamNewFromBytes Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Bytes

bytes: a tBytes

-> m MemoryInputStream

Returns: new tInputStream read from bytes

Creates a new tMemoryInputStream with data from the given bytes.

Since: 2.34

newFromData

memoryInputStreamNewFromData Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

data: input data

-> Maybe DestroyNotify

destroy: function that is called to free data, or Nothing

-> m MemoryInputStream

Returns: new tInputStream read from data of len bytes.

Creates a new tMemoryInputStream with data in memory of a given size.