pub fn validate_attachment(
hash: &str,
size: u64,
name: Option<&str>,
mime: Option<&str>,
) -> DataResult<()>Expand description
Check an attachment reference.
Every bound this layer places on a reference, in one place, so that the
write path and the read path cannot disagree about what a valid reference
is. A reference that fails any of them reads as absent rather than as an
error on the read path: see crate::DataDoc.