Skip to main content

Module stores

Module stores 

Source
Available on crate feature testkit only.
Expand description

In-memory object stores, with pagination that behaves the way the specification describes.

These are what the testkit exists for: a working Locations Sender in three lines, so a test can be about the thing it is testing rather than about a fake database.

The pagination is not a stub. It honours date_from/date_to as the half-open interval the spec defines, applies offset and limit, orders oldest-first as the spec advises — “It is best practice to return the oldest objects first” — and reports X-Total-Count excluding limit and offset, which is the part implementations most often get wrong.

Structs§

InMemoryStore
A store of one object type.

Traits§

Stored
An object that a store can hold: it has an id and a last_updated.

Type Aliases§

InMemoryCdrs
An in-memory store of CDRs.
InMemoryLocations
An in-memory store of Locations.
InMemorySessions
An in-memory store of Sessions.
InMemoryTariffs
An in-memory store of Tariffs.
InMemoryTokens
An in-memory store of Tokens, keyed by uid.