| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Ggit.Structs.Reflog
Description
Represents a reflog.
Synopsis
- newtype Reflog = Reflog (ManagedPtr Reflog)
- reflogAppend :: (HasCallStack, MonadIO m, IsSignature a) => Reflog -> OId -> a -> Text -> m ()
- reflogGetEntryCount :: (HasCallStack, MonadIO m) => Reflog -> m Word32
- reflogGetEntryFromIndex :: (HasCallStack, MonadIO m) => Reflog -> Word32 -> m (Maybe ReflogEntry)
- reflogRef :: (HasCallStack, MonadIO m) => Reflog -> m (Maybe Reflog)
- reflogRename :: (HasCallStack, MonadIO m) => Reflog -> Text -> m ()
- reflogUnref :: (HasCallStack, MonadIO m) => Reflog -> m ()
- reflogWrite :: (HasCallStack, MonadIO m) => Reflog -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Reflog Source # | |
| GBoxed Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog | |
| ManagedPtrNewtype Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog Methods toManagedPtr :: Reflog -> ManagedPtr Reflog | |
| TypedObject Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog Methods glibType :: IO GType | |
| IsGValue Reflog Source # | Convert |
Defined in GI.Ggit.Structs.Reflog | |
| HasParentTypes Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog | |
| type ParentTypes Reflog Source # | |
Defined in GI.Ggit.Structs.Reflog type ParentTypes Reflog = '[] :: [Type] | |
Methods
Overloaded methods
append
Arguments
| :: (HasCallStack, MonadIO m, IsSignature a) | |
| => Reflog |
|
| -> OId |
|
| -> a |
|
| -> Text |
|
| -> m () | (Can throw |
Creates a reflog entry.
getEntryCount
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> m Word32 | Returns: the number of log entries. |
Gets the number of log entries in reflog.
getEntryFromIndex
reflogGetEntryFromIndex Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> Word32 |
|
| -> m (Maybe ReflogEntry) | Returns: the reflog entry at the index, or |
Gets the ReflogEntry at idx in reflog, or Nothing if not found.
ref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> m (Maybe Reflog) | Returns: the passed in |
Atomically increments the reference count of reflog by one.
This function is MT-safe and may be called from any thread.
rename
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Reflog |
|
| -> Text |
|
| -> m () | (Can throw |
Renames the reflog for to newName, on error error is set.
unref
Atomically decrements the reference count of reflog by one.
If the reference count drops to 0, reflog is freed.