state-res: Update docs
This commit is contained in:
parent
97387f36c1
commit
a11c27e7e1
@ -13,7 +13,7 @@ pub trait Event {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A mapping of event type and state_key to some value `T`, usually an `EventId`.
|
/// A mapping of event type and state_key to some value `T`, usually an `EventId`.
|
||||||
pub type StateMap<T> = BTreeMap<(EventType, Option<String>), T>;
|
pub type StateMap<T> = BTreeMap<(StateEventType, Option<String>), T>;
|
||||||
|
|
||||||
/// A mapping of `EventId` to `T`, usually a `OriginalStateEvent`.
|
/// A mapping of `EventId` to `T`, usually a `OriginalStateEvent`.
|
||||||
pub type EventMap<T> = BTreeMap<OwnedEventId, T>;
|
pub type EventMap<T> = BTreeMap<OwnedEventId, T>;
|
||||||
@ -40,6 +40,6 @@ impl StateResolution {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
The `StateStore` trait is an abstraction around what ever database your server (or maybe even client) uses to store __P__[]()ersistant __D__[]()ata __U__[]()nits.
|
The `StateStore` trait is an abstraction around what ever database your server (or maybe even client) uses to store **P**ersistent **D**ata **U**nits.
|
||||||
|
|
||||||
We use `ruma`s types when deserializing any PDU or it's contents which helps avoid a lot of type checking logic [synapse](https://github.com/matrix-org/synapse) must do while authenticating event chains.
|
We use `ruma`s types when deserializing any PDU or it's contents which helps avoid a lot of type checking logic [synapse](https://github.com/matrix-org/synapse) must do while authenticating event chains.
|
||||||
|
@ -158,9 +158,9 @@ where
|
|||||||
///
|
///
|
||||||
/// The return tuple looks like `(unconflicted, conflicted)`.
|
/// The return tuple looks like `(unconflicted, conflicted)`.
|
||||||
///
|
///
|
||||||
/// State is determined to be conflicting if for the given key (EventType, StateKey) there is not
|
/// State is determined to be conflicting if for the given key (StateEventType, StateKey) there is
|
||||||
/// exactly one eventId. This includes missing events, if one state_set includes an event that none
|
/// not exactly one event ID. This includes missing events, if one state_set includes an event that
|
||||||
/// of the other have this is a conflicting event.
|
/// none of the other have this is a conflicting event.
|
||||||
fn separate<'a, Id>(
|
fn separate<'a, Id>(
|
||||||
state_sets_iter: impl Iterator<Item = &'a StateMap<Id>> + Clone,
|
state_sets_iter: impl Iterator<Item = &'a StateMap<Id>> + Clone,
|
||||||
) -> (StateMap<Id>, StateMap<Vec<Id>>)
|
) -> (StateMap<Id>, StateMap<Vec<Id>>)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user