pub enum ProxyMode {
Dynamic,
PreGenerate {
paths: Vec<String>,
fallthrough: bool,
},
}Expand description
Controls the operating mode of the proxy.
Variants§
Dynamic
Dynamic mode: every request is served from cache when available, or forwarded to the upstream backend on a cache miss (default).
PreGenerate
Pre-generate (SSG) mode: a fixed list of paths is fetched from the
upstream server at startup and served exclusively from the cache.
On a cache miss:
fallthrough = false(default): return 404 immediately.fallthrough = true: fall through to the upstream backend.
Use the CacheHandle returned by create_proxy to manage snapshots
at runtime via add_snapshot, refresh_snapshot, remove_snapshot, and
refresh_all_snapshots.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ProxyMode
impl RefUnwindSafe for ProxyMode
impl Send for ProxyMode
impl Sync for ProxyMode
impl Unpin for ProxyMode
impl UnsafeUnpin for ProxyMode
impl UnwindSafe for ProxyMode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more