gi-ggit-1.0.12: libgit2-glib bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Ggit.Objects.Blob

Description

Represents a blob object.

Synopsis

Exported types

newtype Blob Source #

Memory-managed wrapper type.

Constructors

Blob (ManagedPtr Blob) 

Instances

Instances details
Eq Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

Methods

(==) :: Blob -> Blob -> Bool #

(/=) :: Blob -> Blob -> Bool #

GObject Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

ManagedPtrNewtype Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

Methods

toManagedPtr :: Blob -> ManagedPtr Blob

TypedObject Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

Methods

glibType :: IO GType

HasParentTypes Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

IsGValue (Maybe Blob) Source #

Convert Blob to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.Blob

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe Blob -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe Blob)

type ParentTypes Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

type ParentTypes Blob = '[Object, Native, ObjectFactoryBase, Object]

class (GObject o, IsDescendantOf Blob o) => IsBlob o Source #

Type class for types which can be safely cast to Blob, for instance with toBlob.

Instances

Instances details
(GObject o, IsDescendantOf Blob o) => IsBlob o Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

toBlob :: (MonadIO m, IsBlob o) => o -> m Blob Source #

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

Methods

getRawContent

blobGetRawContent Source #

Arguments

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

blob: a Blob.

-> m (Maybe ByteString)

Returns: the blob content or Nothing if the blob does not have any content.

Gets a read-only buffer with the raw contents of blob.

A pointer to the raw contents of blob is returned. This pointer is owned internally by object and must not be free'd. The pointer may be invalidated at a later time.

isBinary

blobIsBinary Source #

Arguments

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

blob: a Blob.

-> m Bool

Returns: True if the blob is binary, False otherwise.

Check whether the blob is binary.