Skip to main content

validate_import

Function validate_import 

pub fn validate_import(
    bytes: &[u8],
    room: &str,
    id: &RecordId,
    max_bytes: usize,
) -> Result<(AutoCommit, RecordCheckout), TransferError>
Expand description

Check bytes offered to become record id of room with their whole history, before anything keeps them: at most max_bytes, a complete document whose identity is exactly that freshly minted record scoped to that room, live, holding no room index and no references to other records, and naming earlier ids only as provenance.

ยงErrors

Bytes that are too large, malformed, or not exactly that record.