Skip to content
YosoiDocs

RuntimeContract

yosoi::contracts::RuntimeContract

pub struct RuntimeContract

Runtime-authored Contract adapter with the same default Policy-derived extraction limits as a derive-backed Contract.

Source: crates/yosoi/src/contracts.rs:27

pub fn extract(&self, located: &yosoi::LocateOutcome) -> yosoi::contracts::RuntimeExtracted

Extracts with the same default limits as MyContract::extract.

Source: crates/yosoi/src/contracts.rs:45

pub fn extract_with_limits(&self, located: &yosoi::LocateOutcome, limits: ExtractionLimits) -> yosoi::contracts::RuntimeExtracted

Extracts with caller-supplied budgets using the same implementation as static Contracts.

Source: crates/yosoi/src/contracts.rs:51

pub fn new(schema: yosoi::contracts::ContractSchema) -> Result<Self, yosoi::contracts::RuntimeContractError>

Owns a validated runtime schema for supported string fields. Returns RuntimeContractError for unsupported scalar types; no evidence is acquired.

Source: crates/yosoi/src/contracts.rs:33

pub const fn schema(&self) -> &yosoi::contracts::ContractSchema

Borrows the portable runtime schema owned by this Contract.

Source: crates/yosoi/src/contracts.rs:40

Clone
fn clone(&self) -> yosoi::contracts::RuntimeContract

Source: crates/yosoi/src/contracts.rs:25

Debug
fn fmt(&self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

Source: crates/yosoi/src/contracts.rs:25

Serialize
fn serialize<__S>(&self, __serializer: __S) -> _serde::__private229::Result<<__S as >::Ok, <__S as >::Error> where __S: _serde::Serializer

Source: crates/yosoi/src/contracts.rs:25