pub struct FunctionSourceConfig {
pub function: String,
pub stale_after: Option<u64>,
pub swr: Option<u64>,
}Expand description
@source(function: "name", staleAfter:, swr:). Same freshness
semantics as the url: arm; the difference is the populator —
an in-component Rust function instead of an HTTP fetch.
Fields§
§function: StringFunction symbol name. Resolved against the app’s own component; cross-component invocation is not yet wired.
stale_after: Option<u64>Seconds after which a cached record is considered stale.
swr: Option<u64>Seconds beyond stale_after for serve-while-revalidate.
Trait Implementations§
Source§impl Clone for FunctionSourceConfig
impl Clone for FunctionSourceConfig
Source§fn clone(&self) -> FunctionSourceConfig
fn clone(&self) -> FunctionSourceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FunctionSourceConfig
impl RefUnwindSafe for FunctionSourceConfig
impl Send for FunctionSourceConfig
impl Sync for FunctionSourceConfig
impl Unpin for FunctionSourceConfig
impl UnsafeUnpin for FunctionSourceConfig
impl UnwindSafe for FunctionSourceConfig
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