| Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Soup.Structs.Range
Contents
Description
Represents a byte range as used in the Range header.
If end is non-negative, then start and end represent the bounds
of of the range, counting from 0. (Eg, the first 500 bytes would be
represented as start = 0 and @end = 499.)
If end is -1 and start is non-negative, then this represents a
range starting at start and ending with the last byte of the
requested resource body. (Eg, all but the first 500 bytes would be
start = 500, and @end = -1.)
If end is -1 and start is negative, then it represents a "suffix
range", referring to the last -start bytes of the resource body.
(Eg, the last 500 bytes would be start = -500 and @end = -1.)
- newtype Range = Range (ForeignPtr Range)
- newZeroRange :: MonadIO m => m Range
- noRange :: Maybe Range
- rangeEnd :: AttrLabelProxy "end"
- rangeReadEnd :: MonadIO m => Range -> m Int64
- rangeWriteEnd :: MonadIO m => Range -> Int64 -> m ()
- rangeReadStart :: MonadIO m => Range -> m Int64
- rangeStart :: AttrLabelProxy "start"
- rangeWriteStart :: MonadIO m => Range -> Int64 -> m ()
Exported types
Constructors
| Range (ForeignPtr Range) |
Instances
| WrappedPtr Range | |
| (~) AttrOpTag tag AttrSet => Constructible Range tag | |
| ((~) * info (ResolveRangeMethod t Range), MethodInfo * info Range p) => IsLabelProxy t (Range -> p) | |
| type AttributeList Range |
newZeroRange :: MonadIO m => m Range Source
Construct a Range struct initialized to zero.
Properties
End
rangeEnd :: AttrLabelProxy "end" Source
rangeReadEnd :: MonadIO m => Range -> m Int64 Source
rangeWriteEnd :: MonadIO m => Range -> Int64 -> m () Source
Start
rangeReadStart :: MonadIO m => Range -> m Int64 Source
rangeStart :: AttrLabelProxy "start" Source
rangeWriteStart :: MonadIO m => Range -> Int64 -> m () Source