gi-ggit-1.0.8: libgit2-glib bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
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 #

IsGValue Blob Source #

Convert Blob to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Ggit.Objects.Blob

GObject Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

Methods

gobjectType :: IO GType #

HasParentTypes Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

type ParentTypes Blob Source # 
Instance details

Defined in GI.Ggit.Objects.Blob

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.

noBlob :: Maybe Blob Source #

A convenience alias for Nothing :: Maybe Blob.

Methods

Overloaded 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.