| 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 |
GI.Ggit.Structs.DiffLine
Description
Represents the line of a diff.
Synopsis
- newtype DiffLine = DiffLine (ManagedPtr DiffLine)
- diffLineGetContent :: (HasCallStack, MonadIO m) => DiffLine -> m ByteString
- diffLineGetContentOffset :: (HasCallStack, MonadIO m) => DiffLine -> m Int64
- diffLineGetNewLineno :: (HasCallStack, MonadIO m) => DiffLine -> m Int32
- diffLineGetOldLineno :: (HasCallStack, MonadIO m) => DiffLine -> m Int32
- diffLineGetOrigin :: (HasCallStack, MonadIO m) => DiffLine -> m DiffLineType
- diffLineGetText :: (HasCallStack, MonadIO m) => DiffLine -> m (Maybe Text)
- diffLineRef :: (HasCallStack, MonadIO m) => DiffLine -> m (Maybe DiffLine)
- diffLineUnref :: (HasCallStack, MonadIO m) => DiffLine -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq DiffLine Source # | |
| GBoxed DiffLine Source # | |
Defined in GI.Ggit.Structs.DiffLine | |
| ManagedPtrNewtype DiffLine Source # | |
Defined in GI.Ggit.Structs.DiffLine Methods toManagedPtr :: DiffLine -> ManagedPtr DiffLine | |
| TypedObject DiffLine Source # | |
Defined in GI.Ggit.Structs.DiffLine | |
| HasParentTypes DiffLine Source # | |
Defined in GI.Ggit.Structs.DiffLine | |
| IsGValue (Maybe DiffLine) Source # | Convert |
Defined in GI.Ggit.Structs.DiffLine Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe DiffLine -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe DiffLine) | |
| type ParentTypes DiffLine Source # | |
Defined in GI.Ggit.Structs.DiffLine | |
Methods
Click to display all available methods, including inherited ones
Methods
Getters
getContent, getContentOffset, getNewLineno, getOldLineno, getOrigin, getText.
Setters
None.
getContent
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m ByteString | Returns: the content in bytes. |
Gets the content in bytes.
getContentOffset
diffLineGetContentOffset Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m Int64 | Returns: the content offset. |
Gets the content offset.
getNewLineno
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m Int32 | Returns: the line's old number of lines. |
Gets the Line number in new file or -1 for deleted line.
getOldLineno
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m Int32 | Returns: the line's old line number. |
Gets the line number in old file or -1 for added line.
getOrigin
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m DiffLineType | Returns: the |
Gets the DiffLineType value.
getText
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m (Maybe Text) | Returns: the content in utf-8 encoding or |
Get the content of the diff line as UTF-8 encoded text.
ref
Atomically increments the reference count of line by one.
This function is MT-safe and may be called from any thread.
unref
Arguments
| :: (HasCallStack, MonadIO m) | |
| => DiffLine |
|
| -> m () |
Atomically decrements the reference count of line by one.
If the reference count drops to 0, line is freed.