template <typename RangeContainer, typename KeyType>

struct DefaultRangeTraits

Defined at line 21 of file ../../zircon/system/ulib/range/include/range/range.h

Provides default mechanisms for accessing and updating the range within the

RangeContainer. This abstraction allows customized versions of |Range| to

access these semantics from arbitrary containers.

Public Methods

KeyType Start (const RangeContainer & obj)

Returns the start of the range (inclusive).

Defined at line 23 of file ../../zircon/system/ulib/range/include/range/range.h

KeyType End (const RangeContainer & obj)

Returns the end of the range (exclusive).

Defined at line 26 of file ../../zircon/system/ulib/range/include/range/range.h

zx_status_t Update (const RangeContainer * other, KeyType start, KeyType end, RangeContainer * obj)

Updates |obj| with a new |start| and |end|.

ARGUMENTS:

If |other| is nullptr, then |obj| is being updated independently (typically,

when the range is shrinking).

If |other| is not nullptr, then |obj| is being updated due to a merge with |other|.

|obj| must not be nullptr.

BEHAVIOR:

- If the merge with |other| is valid, |Start()| and |End()| should be updated to return the

new values, and ZX_OK should be returned.

- If the merge with |other| is invalid, an error status should be returned, and |Start()|

and |End()| must return unmodified values.

- If |other| is null, then ZX_OK must be returned.

Defined at line 44 of file ../../zircon/system/ulib/range/include/range/range.h