pub fn encode_item(input: &PreparedContent) -> Result<Vec<u8>, ContentError>Expand description
Encode a ContentInput into the protobuf ItemMessage bytes, tagging the
right mixin set for the chosen ContentType.
Returns an error when an embedded image’s digest hex or mipmap CID is
malformed (see encode_image_mixin); a well-formed item always succeeds.
§Errors
Fails with crate::ContentError::Cid when the embedded image’s
digest_hex or any mipmap CID is malformed (propagated from
encode_image_mixin); otherwise never fails.