pub struct ExecutableCache { /* private fields */ }Expand description
Exact-input, byte-bounded, single-flight cache of vocabulary-neutral executables.
Implementations§
Source§impl ExecutableCache
impl ExecutableCache
Sourcepub fn with_budget(budget: usize) -> Self
pub fn with_budget(budget: usize) -> Self
Empty cache with an explicit byte budget.
Sourcepub fn get_or_compile_json(
&self,
schema: &str,
options: CompileOptions,
) -> Result<Arc<CachedExecutable>, CompileError>
pub fn get_or_compile_json( &self, schema: &str, options: CompileOptions, ) -> Result<Arc<CachedExecutable>, CompileError>
Returns or compiles the exact JSON input and options. Digest equality only selects a bucket;
ExactInputKey equality establishes identity.
Sourcepub fn get_or_compile_schema_set(
&self,
schema: &str,
retrieval_uri: Option<&str>,
resources: &[(String, String)],
options: CompileOptions,
limits: SchemaResourceLimits,
) -> Result<Arc<CachedExecutable>, CompileError>
pub fn get_or_compile_schema_set( &self, schema: &str, retrieval_uri: Option<&str>, resources: &[(String, String)], options: CompileOptions, limits: SchemaResourceLimits, ) -> Result<Arc<CachedExecutable>, CompileError>
Returns or compiles an exact root, resource registry, options, and limit set.
Sourcepub fn get_or_compile_wire(
&self,
wire: &[u8],
) -> Result<Arc<CachedExecutable>, CompileError>
pub fn get_or_compile_wire( &self, wire: &[u8], ) -> Result<Arc<CachedExecutable>, CompileError>
Returns or decodes one exact MFIR wire input before semantic executable lookup.
Sourcepub fn get_or_compile_ir(
&self,
ir: Arc<SchemaIR>,
) -> Result<Arc<CachedExecutable>, CompileError>
pub fn get_or_compile_ir( &self, ir: Arc<SchemaIR>, ) -> Result<Arc<CachedExecutable>, CompileError>
Returns or compiles one exact canonical IR independently of its source spelling.
Sourcepub fn clear(&self)
pub fn clear(&self)
Drops every ready entry, releasing their retained bytes; leaves in-flight builds running.
Sourcepub fn stats(&self) -> ExecutableCacheStats
pub fn stats(&self) -> ExecutableCacheStats
Current retention plus cumulative traffic.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ExecutableCache
impl RefUnwindSafe for ExecutableCache
impl Send for ExecutableCache
impl Sync for ExecutableCache
impl Unpin for ExecutableCache
impl UnsafeUnpin for ExecutableCache
impl UnwindSafe for ExecutableCache
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