pub fn check_pdu_format(
pdu: &CanonicalJsonObject,
rules: &EventFormatRules,
) -> Result<(), String>Expand description
Check that the given canonicalized PDU respects the event format of the room version and the size limits from the Matrix specification.
This is part of the checks performed on receipt of a PDU.
This checks the following and enforces their size limits:
- Full PDU
senderroom_idtypeevent_idstate_keyprev_eventsauth_eventsdepth
Returns an Err(_) if the JSON is malformed or if the PDU doesn’t pass the checks.