Skip to main content

Module canonical_json

Module canonical_json 

Source
Expand description

Canonical JSON types and related functions.

Macros§

assert_to_canonical_json_eq
Asserts that the canonical JSON serialization of a type is equal to an expected JSON value.

Structs§

RedactedBecause
The value to put in unsigned.redacted_because.
Serializer
A serde::Serializer whose output is a CanonicalJsonValue.

Enums§

CanonicalJsonError
The set of possible errors when serializing to canonical JSON.
CanonicalJsonType
The possible types of a CanonicalJsonValue.
CanonicalJsonValue
Represents a canonical JSON value as per the Matrix specification.
JsonType
The possible types of a JSON value.
RedactionError
Errors that can happen in redaction.

Traits§

RedactionEvent
Marker trait for redaction events.

Functions§

redact
Redacts an event using the rules specified in the Matrix client-server specification.
redact_content_in_place
Redacts the given event content using the given redaction rules for the version of the current room.
redact_in_place
Redacts an event using the rules specified in the Matrix client-server specification.
to_canonical_value
Fallible conversion from any value that implements Serialize to a CanonicalJsonValue.
try_from_json_map
Fallible conversion from a serde_json::Map to a CanonicalJsonObject.

Type Aliases§

CanonicalJsonObject
The inner type of CanonicalJsonValue::Object.