1use snafu::Snafu;
2
3pub mod builder;
4pub use builder::CacheBuilder;
5pub mod handle;
6pub use handle::CachedContentHandle;
7pub mod model;
8
9#[derive(Debug, Snafu)]
10pub enum Error {
11 #[snafu(display("client invocation error"))]
12 Client { source: Box<crate::client::Error> },
13
14 #[snafu(display(
15 "cache display name ('{display_name}') too long ({chars}), must be under 128 characters"
16 ))]
17 LongDisplayName { display_name: String, chars: usize },
18
19 #[snafu(display("expiration (TTL or expire time) is required for cache creation"))]
20 MissingExpiration,
21}