use tessarikv_constants as limits;
use super::bounds::check_range;
use super::db::{DbOptions, DbOptionsBuilder};
use crate::Result;
impl DbOptions {
#[must_use]
pub const fn max_manifest_bytes(&self) -> u64 {
self.max_manifest_bytes
}
}
impl DbOptionsBuilder {
pub const fn max_manifest_bytes(mut self, value: u64) -> Self {
self.options.max_manifest_bytes = value;
self
}
}
pub(super) fn check(options: &DbOptions) -> Result<()> {
check_range(
"db.max_manifest_bytes",
options.max_manifest_bytes,
limits::MIN_MAX_MANIFEST_BYTES,
limits::MAX_MAX_MANIFEST_BYTES,
)
}