pub struct ContractCard {
pub lib: Symbol,
pub export_kind: Symbol,
pub symbol: Symbol,
pub args_shape: Option<Expr>,
pub result_shape: Option<Expr>,
pub capability_symbols: Vec<Symbol>,
pub card_requires: Option<Expr>,
pub summary: String,
pub example: Option<Expr>,
pub partial: Vec<ContractGap>,
}Expand description
A compact, source-free model-facing contract for one loaded export.
Fields§
§lib: SymbolLibrary that contributed the export.
export_kind: SymbolExport kind, carried as the kernel’s open export-kind symbol.
symbol: SymbolExport symbol.
args_shape: Option<Expr>Callable argument Shape encoded as data when known.
result_shape: Option<Expr>Callable result Shape encoded as data when known.
capability_symbols: Vec<Symbol>Library manifest capability requests, as capability/* symbols.
card_requires: Option<Expr>Browse Card requires data, when present.
summary: StringHuman-facing Card summary text.
example: Option<Expr>Example expression, authored or synthesized from the callable Shape.
partial: Vec<ContractGap>Missing or synthesized pieces retained without dropping the export.
Implementations§
Source§impl ContractCard
impl ContractCard
Sourcepub fn as_expr(&self) -> Expr
pub fn as_expr(&self) -> Expr
Encodes this card as tagged open data accepted by contract_card_shape.
Trait Implementations§
Source§impl Clone for ContractCard
impl Clone for ContractCard
Source§fn clone(&self) -> ContractCard
fn clone(&self) -> ContractCard
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 moreSource§impl Debug for ContractCard
impl Debug for ContractCard
impl Eq for ContractCard
Source§impl PartialEq for ContractCard
impl PartialEq for ContractCard
impl StructuralPartialEq for ContractCard
Auto Trait Implementations§
impl Freeze for ContractCard
impl RefUnwindSafe for ContractCard
impl Send for ContractCard
impl Sync for ContractCard
impl Unpin for ContractCard
impl UnsafeUnpin for ContractCard
impl UnwindSafe for ContractCard
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.