Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
MemoryInputStream
is a class for using arbitrary
memory chunks as input for GIO streaming input operations.
As of GLib 2.34, MemoryInputStream
implements
PollableInputStream
.
Synopsis
- newtype MemoryInputStream = MemoryInputStream (ManagedPtr MemoryInputStream)
- class (GObject o, IsDescendantOf MemoryInputStream o) => IsMemoryInputStream o
- toMemoryInputStream :: (MonadIO m, IsMemoryInputStream o) => o -> m MemoryInputStream
- memoryInputStreamAddBytes :: (HasCallStack, MonadIO m, IsMemoryInputStream a) => a -> Bytes -> m ()
- memoryInputStreamAddData :: (HasCallStack, MonadIO m, IsMemoryInputStream a) => a -> ByteString -> Maybe DestroyNotify -> m ()
- memoryInputStreamNew :: (HasCallStack, MonadIO m) => m MemoryInputStream
- memoryInputStreamNewFromBytes :: (HasCallStack, MonadIO m) => Bytes -> m MemoryInputStream
- memoryInputStreamNewFromData :: (HasCallStack, MonadIO m) => ByteString -> Maybe DestroyNotify -> m MemoryInputStream
Exported types
newtype MemoryInputStream Source #
Memory-managed wrapper type.
Instances
Eq MemoryInputStream Source # | |
Defined in GI.Gio.Objects.MemoryInputStream (==) :: MemoryInputStream -> MemoryInputStream -> Bool # (/=) :: MemoryInputStream -> MemoryInputStream -> Bool # | |
IsGValue MemoryInputStream Source # | Convert |
Defined in GI.Gio.Objects.MemoryInputStream toGValue :: MemoryInputStream -> IO GValue # fromGValue :: GValue -> IO MemoryInputStream # | |
ManagedPtrNewtype MemoryInputStream Source # | |
TypedObject MemoryInputStream Source # | |
Defined in GI.Gio.Objects.MemoryInputStream | |
GObject MemoryInputStream Source # | |
Defined in GI.Gio.Objects.MemoryInputStream | |
HasParentTypes MemoryInputStream Source # | |
Defined in GI.Gio.Objects.MemoryInputStream | |
type ParentTypes MemoryInputStream Source # | |
Defined in GI.Gio.Objects.MemoryInputStream |
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 # | |
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
.
Methods
Overloaded methods
addBytes
memoryInputStreamAddBytes Source #
:: (HasCallStack, MonadIO m, IsMemoryInputStream a) | |
=> a |
|
-> Bytes |
|
-> m () |
Appends bytes
to data that can be read from the input stream.
Since: 2.34
addData
memoryInputStreamAddData Source #
:: (HasCallStack, MonadIO m, IsMemoryInputStream a) | |
=> a |
|
-> ByteString |
|
-> Maybe DestroyNotify |
|
-> m () |
Appends data
to data that can be read from the input stream
new
:: (HasCallStack, MonadIO m) | |
=> m MemoryInputStream | Returns: a new |
Creates a new empty MemoryInputStream
.
newFromBytes
memoryInputStreamNewFromBytes Source #
:: (HasCallStack, MonadIO m) | |
=> Bytes |
|
-> m MemoryInputStream | Returns: new |
Creates a new MemoryInputStream
with data from the given bytes
.
Since: 2.34
newFromData
memoryInputStreamNewFromData Source #
:: (HasCallStack, MonadIO m) | |
=> ByteString |
|
-> Maybe DestroyNotify |
|
-> m MemoryInputStream | Returns: new |
Creates a new MemoryInputStream
with data in memory of a given size.