Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A structure which globally uniquely identifies a ref as the tuple
(collectionId
, refName
). For backwards compatibility, collectionId
may be Nothing
,
indicating a ref name which is not globally unique.
Since: 2018.6
Synopsis
- newtype CollectionRef = CollectionRef (ManagedPtr CollectionRef)
- newZeroCollectionRef :: MonadIO m => m CollectionRef
- collectionRefDup :: (HasCallStack, MonadIO m) => CollectionRef -> m CollectionRef
- collectionRefDupv :: (HasCallStack, MonadIO m) => [CollectionRef] -> m [CollectionRef]
- collectionRefEqual :: (HasCallStack, MonadIO m) => Ptr () -> Ptr () -> m Bool
- collectionRefFree :: (HasCallStack, MonadIO m) => CollectionRef -> m ()
- collectionRefFreev :: (HasCallStack, MonadIO m) => [CollectionRef] -> m ()
- collectionRefHash :: (HasCallStack, MonadIO m) => Ptr () -> m Word32
- collectionRefNew :: (HasCallStack, MonadIO m) => Maybe Text -> Text -> m (Maybe CollectionRef)
- clearCollectionRefCollectionId :: MonadIO m => CollectionRef -> m ()
- getCollectionRefCollectionId :: MonadIO m => CollectionRef -> m (Maybe Text)
- setCollectionRefCollectionId :: MonadIO m => CollectionRef -> CString -> m ()
- clearCollectionRefRefName :: MonadIO m => CollectionRef -> m ()
- getCollectionRefRefName :: MonadIO m => CollectionRef -> m (Maybe Text)
- setCollectionRefRefName :: MonadIO m => CollectionRef -> CString -> m ()
Exported types
newtype CollectionRef Source #
Memory-managed wrapper type.
CollectionRef (ManagedPtr CollectionRef) |
Instances
newZeroCollectionRef :: MonadIO m => m CollectionRef Source #
Construct a CollectionRef
struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
dup
:: (HasCallStack, MonadIO m) | |
=> CollectionRef |
|
-> m CollectionRef | Returns: a newly allocated copy of |
Create a copy of the given ref
.
Since: 2018.6
dupv
:: (HasCallStack, MonadIO m) | |
=> [CollectionRef] |
|
-> m [CollectionRef] | Returns: a newly allocated copy of |
equal
:: (HasCallStack, MonadIO m) | |
=> Ptr () |
|
-> Ptr () |
|
-> m Bool |
free
:: (HasCallStack, MonadIO m) | |
=> CollectionRef |
|
-> m () |
Free the given ref
.
Since: 2018.6
freev
:: (HasCallStack, MonadIO m) | |
=> [CollectionRef] |
|
-> m () |
hash
:: (HasCallStack, MonadIO m) | |
=> Ptr () |
|
-> m Word32 | Returns: hash value for |
new
:: (HasCallStack, MonadIO m) | |
=> Maybe Text |
|
-> Text |
|
-> m (Maybe CollectionRef) | Returns: a new |
Create a new CollectionRef
containing (collectionId
, refName
). If
collectionId
is Nothing
, this is equivalent to a plain ref name string (not a
refspec; no remote name is included), which can be used for non-P2P
operations.
Since: 2018.6
Properties
collectionId
collection ID which provided the ref, or Nothing
if there
is no associated collection
clearCollectionRefCollectionId :: MonadIO m => CollectionRef -> m () Source #
Set the value of the “collection_id
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#collectionId
getCollectionRefCollectionId :: MonadIO m => CollectionRef -> m (Maybe Text) Source #
Get the value of the “collection_id
” field.
When overloading is enabled, this is equivalent to
get
collectionRef #collectionId
setCollectionRefCollectionId :: MonadIO m => CollectionRef -> CString -> m () Source #
Set the value of the “collection_id
” field.
When overloading is enabled, this is equivalent to
set
collectionRef [ #collectionId:=
value ]
refName
ref name
clearCollectionRefRefName :: MonadIO m => CollectionRef -> m () Source #
Set the value of the “ref_name
” field to Nothing
.
When overloading is enabled, this is equivalent to
clear
#refName
getCollectionRefRefName :: MonadIO m => CollectionRef -> m (Maybe Text) Source #
Get the value of the “ref_name
” field.
When overloading is enabled, this is equivalent to
get
collectionRef #refName
setCollectionRefRefName :: MonadIO m => CollectionRef -> CString -> m () Source #
Set the value of the “ref_name
” field.
When overloading is enabled, this is equivalent to
set
collectionRef [ #refName:=
value ]