gi-ggit-1.0.7: libgit2-glib bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.Ggit.Structs.OId

Contents

Description

Represents a unique ID of any object.

Synopsis

Exported types

newtype OId Source #

Memory-managed wrapper type.

Constructors

OId (ManagedPtr OId) 
Instances
BoxedObject OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

Methods

boxedType :: OId -> IO GType #

noOId :: Maybe OId Source #

A convenience alias for Nothing :: Maybe OId.

Methods

compare

oIdCompare Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

a: first OId.

-> OId

b: second OId.

-> m Int32

Returns: <0, 0, >0 if a < b, a == b, a > b.

Compare two OId structures.

copy

oIdCopy Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

oid: a OId.

-> m (Maybe OId)

Returns: a newly allocated OId.

Copies oid into a newly allocated OId.

equal

oIdEqual Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

a: a OId.

-> OId

b: a OId.

-> m Bool

Returns: True if a and b are equal, False otherwise

Compares two OId for equality.

free

oIdFree Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

oid: a OId.

-> m () 

Frees oid.

hasPrefix

oIdHasPrefix Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

oid: a OId.

-> Text

prefix: a prefix.

-> m Bool

Returns: True if the id has the given prefix, False otherwise.

Check whether the object id has a given prefix. Note that the prefix is specified in hexadecimal ASCII.

hash

oIdHash Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

oid: a OId.

-> m Word32

Returns: the hash value

Computes a hash value for a git object identifier.

isZero

oIdIsZero Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

oid: a OId.

-> m Bool

Returns: True if the oid contains only zeros, False otherwise.

Get whether the oid contains only zeros.

newFromRaw

oIdNewFromRaw Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> ByteString

raw: the raw input bytes to be copied.

-> m (Maybe OId)

Returns: a newly allocated OId or Nothing on error.

Creates a new OId from a raw oid.

newFromString

oIdNewFromString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

str: input hex string; must be pointing at the start of the hex sequence and have at least the number of bytes needed for an oid encoded in hex (40 bytes).

-> m (Maybe OId)

Returns: a newly allocated OId or Nothing on error.

Parses a hex formatted object id into a OId.

toString

oIdToString Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> OId

oid: a OId.

-> m (Maybe Text)

Returns: a newly allocated string representing oid or Nothing.

Converts oid into a readable string.