gi-soup-2.4.11: Libsoup bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

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.)

Synopsis

Exported types

newtype Range Source #

Constructors

Range (ManagedPtr Range) 

Instances

WrappedPtr Range Source # 
(~) AttrOpTag tag AttrSet => Constructible Range tag Source # 

Methods

new :: MonadIO m => (ManagedPtr Range -> Range) -> [AttrOp Range tag] -> m Range #

((~) * info (ResolveRangeMethod t Range), MethodInfo * info Range p) => IsLabel t (Range -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Range -> p #

((~) * info (ResolveRangeMethod t Range), MethodInfo * info Range p) => IsLabelProxy t (Range -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Range -> p #

HasAttributeList * Range Source # 
type AttributeList Range Source # 

newZeroRange :: MonadIO m => m Range Source #

Construct a Range struct initialized to zero.

Properties

end

setRangeEnd :: MonadIO m => Range -> Int64 -> m () Source #

start