pub enum MatrixStoreError {
Db(Error),
Json(Error),
ReservedLocalpart,
DuplicateAnnotation,
UnknownEventId(String),
UnknownMxid(String),
InvalidMembership(String),
InvalidRelationTarget(String),
WrongRoom(String),
UnredactableEvent(String),
}Expand description
Why a write into this store was refused, on top of a real database
failure — same shape as dm_db::MessageError/IdentityKeyError.
Variants§
Db(Error)
Json(Error)
An event’s content was not valid JSON where this module needed to
read a field out of it (membership, power levels, m.relates_to).
ReservedLocalpart
ensure_matrix_user was asked to mint a reserved localpart (plan
§10 item 6) — see is_reserved_localpart.
DuplicateAnnotation
A second m.annotation relation with the same sender, target, and
aggregation key as an existing one (plan §2/§9: maps to
M_DUPLICATE_ANNOTATION/400 at the route layer, a later piece).
UnknownEventId(String)
A referenced event id does not exist in events.
UnknownMxid(String)
A referenced mxid does not exist in matrix_users — the caller must
ensure_matrix_user before naming that user in room state.
InvalidMembership(String)
An m.room.member event’s content.membership was missing or not
one of join/invite/leave/ban.
InvalidRelationTarget(String)
A relation’s m.relates_to target (the String is the target event
id) does not exist, or exists in a different room than the relation
event being inserted — a relation can never point out of its own
room.
WrongRoom(String)
A referenced event (the String is its event id) exists but is in a
different room than the one the caller named — refused rather than
silently acted on, since acting on it would let a caller redact or
mark-read an event that was never a member of the room they claimed.
UnredactableEvent(String)
redact_event was asked to redact an event type this server never
allows to be redacted (the String is that event_type) — see
redact_event’s doc comment.