Expand description
Re-exports§
pub use crate::data_types::NoatunCell;pub use crate::data_types::OpaqueNoatunCell;pub use database::Database;pub use database::DatabaseSettings;pub use database::OpenMode;
Modules§
- communication
- Tokio-based communication mechanism for synchronizing a noatun database with peers.
- data_
types - Datatypes for use in the noatun materialized view.
- database
- This module contains the main user-facing database type:
Database. - diagnostics
- Module containing data types used by the diagnostics feature of noatun.
- distributor
- The distributor contains all logic needed to distribute events between noatun
instances. It does not contain any actual IO code. Instead, something like
crate::communication::DatabaseCommunicationcan be used to communicate over UDP or similar. - guide
- Introduction to Noatun
- noatun_
instant - Module use to abstract ‘Instant’. If the tokio feature is activated, it resolves to ‘tokio::time::Instant’, otherwise std::time::Instant.
- prelude
- Commonly used types
- sequence_
nr - Helper module containing the definition of the
SequenceNrtype. - simple_
metrics - Simple metrics recorder
Macros§
- noatun_
object - Define a noatun object.
- noatun_
pod - Define a noatun pod struct.
Structs§
- CutOff
Duration - How far back in time the cutoff time nominally is.
- CutOff
State - The current cutoff hash and timestamp
- Dummy
Message Serializer - Dummy serializer that panics on all use
- Dummy
Unit Object - A state-less object, mostly useful for testing
- FatPtr
- A fat pointer to noatun materialized view storage.
- Message
Frame - A MessageFrame is the fundamental building block of a Noatun database.
- Message
Header - A Noatun-message has a header with the id, and the list of parents.
See
MessageFrame. - Message
Id - The identity of a message.
- Noatun
Context - Global unit struct used for accessing the current thread local noatun context.
- Noatun
Time - Wall clock time
- Savefile
Message Serializer - A noatun serializer using the savefile library. See
savefile. - Schema
Hasher - Hasher for hashing noatun database schemas.
- ThinPtr
- An offset into the on disk store.
Enums§
- GenPtr
- A pointer into the materialized view store.
- Persistence
- Controls how long this message will persist
- Target
- Strategy for handling any pre-existing database files when opening a database
Constants§
- CONTEXT
- The current context for the running thread.
- DEBUG_
NODE - In debug-builds, this thread local data tracks which node is currently processed
Traits§
- Fixed
Size Object - Trait for implementations of
Objectthat have a fixed size, and have an internal representation that is bitwise compatible with their Database format. - Message
- An event handled by Noatun.
- Message
Ext - Extension trait to provide serialization for Message impls
- Noatun
Message Serializer - Trait for a serializer that can serialize/deserialize a Message of type
MSG. - Noatun
Pod - Trait for noatun plain data objects.
- Noatun
Storable - A trait for things that can be stored in the noatun materialized view.
- Object
- An item that can be stored in the noatun db materialized view.
- Pointer
- Type abstracting any type of pointer into the materialized view
Functions§
- bytes_
of - Cast a reference to a NoatunStorable into a slice of bytes
- bytes_
of_ mut - Cast a reference to a NoatunStorable into a slice of bytes
- bytes_
of_ mut_ object - Cast a reference to a NoatunStorable into a slice of bytes
- calculate_
schema_ hash - Calculate the correct hash for the schema of the given object
- cast_
slice - Cast from a slice of I to a slice of O.
- cast_
slice_ mut - Cast from a slice of I to a slice of O.
- cast_
storable - Cast between two different storable objects
- dyn_
cast_ slice - Requires alignment to be correct at runtime, panics otherwise
- dyn_
cast_ slice_ mut - Requires alignment to be correct at runtime, panics otherwise
- from_
bytes - Convert from a slice of bytes to a T.
- from_
bytes_ mut - Convert from a slice of bytes to a T.
- read_
unaligned - Read a value of type T from the bytes of ‘data’.
- set_
test_ epoch - Helper useful for tests.
- test_
elapsed - Returns the time elapsed since the test epoch established using
set_test_epoch - test_
epoch - Helper useful for tests