gi-ggit-1.0.11: 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.Structs.OId

Description

Represents a unique ID of any object.

Synopsis

Exported types

newtype OId Source #

Memory-managed wrapper type.

Constructors

OId (ManagedPtr OId) 

Instances

Instances details
Eq OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

Methods

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

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

GBoxed OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

ManagedPtrNewtype OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

TypedObject OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

Methods

glibType :: IO GType #

HasParentTypes OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

IsGValue (Maybe OId) Source #

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

Instance details

Defined in GI.Ggit.Structs.OId

type ParentTypes OId Source # 
Instance details

Defined in GI.Ggit.Structs.OId

type ParentTypes OId = '[] :: [Type]

Methods

Click to display all available methods, including inherited ones

Expand

Methods

compare, copy, equal, free, hasPrefix, hash, isZero, toString.

Getters

None.

Setters

None.

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.