(&self)
| 43 | |
| 44 | impl PatchEvidenceLimits { |
| 45 | pub fn validate(&self) -> Result<(), RepositoryError> { |
| 46 | if self.max_operations > MAX_EVIDENCE_OPERATIONS |
| 47 | || self.max_operation_bytes > MAX_EVIDENCE_OPERATION_BYTES |
| 48 | || self.max_content_bytes > MAX_EVIDENCE_CONTENT_BYTES |
| 49 | { |
| 50 | return Err(RepositoryError::Serialization( |
| 51 | "patch evidence limits exceed hard maxima".into(), |
| 52 | )); |
| 53 | } |
| 54 | Ok(()) |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] |