use crate::enums::VerificationDomain;
use crate::enums::ViolationKind;
use crate::enums::WittLevel;
use crate::HostTypes;
pub trait Shape<H: HostTypes> {
fn target_class(&self) -> &H::HostString;
type PropertyConstraint: PropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint];
fn surface_form(&self) -> &H::HostString;
}
pub trait PropertyConstraint<H: HostTypes> {
fn constraint_property(&self) -> &H::HostString;
fn constraint_range(&self) -> &H::HostString;
fn min_count(&self) -> u64;
fn max_count(&self) -> u64;
fn surface_keyword(&self) -> &H::HostString;
fn surface_production(&self) -> &H::HostString;
}
pub trait WittLevelShape<H: HostTypes>: Shape<H> {}
pub trait EffectShape<H: HostTypes>: Shape<H> {}
pub trait ParallelShape<H: HostTypes>: Shape<H> {}
pub trait StreamShape<H: HostTypes>: Shape<H> {}
pub trait DispatchShape<H: HostTypes>: Shape<H> {}
pub trait LeaseShape<H: HostTypes>: Shape<H> {}
pub trait GroundingShape<H: HostTypes>: Shape<H> {}
pub trait ValidationResult<H: HostTypes> {
type Shape: Shape<H>;
fn validation_shape(&self) -> &Self::Shape;
fn validation_target(&self) -> &H::HostString;
fn conforms(&self) -> bool;
}
pub trait PredicateShape<H: HostTypes>: Shape<H> {}
pub trait InteractionShape<H: HostTypes>: Shape<H> {}
pub trait WitnessDatum<H: HostTypes> {
fn witness_level(&self) -> u64;
fn witness_bytes(&self) -> &H::WitnessBytes;
}
pub trait GroundedCoordinate<H: HostTypes> {
fn coordinate_level(&self) -> WittLevel;
}
pub trait GroundedTuple<H: HostTypes> {}
pub trait GroundedValueMarker<H: HostTypes> {}
pub trait ValidatedWrapper<H: HostTypes> {
fn validated_inner(&self) -> &H::HostString;
}
pub trait WitnessDerivation<H: HostTypes> {}
pub trait WitnessSiteBudget<H: HostTypes> {}
pub trait ShapeViolationReport<H: HostTypes> {
fn shape_iri(&self) -> &H::HostString;
fn constraint_iri(&self) -> &H::HostString;
fn property_iri(&self) -> &H::HostString;
fn expected_range(&self) -> &H::HostString;
fn violation_min_count(&self) -> u64;
fn violation_max_count(&self) -> u64;
fn violation_kind(&self) -> ViolationKind;
}
pub trait CompileUnitBuilder<H: HostTypes> {
type Term: crate::kernel::schema::Term<H>;
fn builder_root_term(&self) -> &Self::Term;
fn builder_witt_level_ceiling(&self) -> WittLevel;
fn builder_thermodynamic_budget(&self) -> H::Decimal;
fn builder_target_domains(&self) -> &[VerificationDomain];
}
pub trait EffectDeclaration<H: HostTypes> {
fn effect_name(&self) -> &H::HostString;
fn target_sites(&self) -> &[u64];
fn budget_delta(&self) -> i64;
fn commutation_flag(&self) -> bool;
}
pub trait GroundingDeclaration<H: HostTypes> {
type TypeDefinition: crate::user::type_::TypeDefinition<H>;
fn grounding_source_type(&self) -> &Self::TypeDefinition;
fn ring_mapping(&self) -> &H::HostString;
fn invertibility_contract(&self) -> bool;
}
pub trait DispatchDeclaration<H: HostTypes> {
type PredicateExpression: crate::kernel::reduction::PredicateExpression<H>;
fn dispatch_predicate(&self) -> &Self::PredicateExpression;
type Resolver: crate::bridge::resolver::Resolver<H>;
fn target_resolver(&self) -> &Self::Resolver;
fn dispatch_priority(&self) -> u64;
}
pub trait LeaseDeclaration<H: HostTypes> {
fn linear_site(&self) -> u64;
fn lease_scope(&self) -> &H::HostString;
}
pub trait StreamDeclaration<H: HostTypes> {
type Term: crate::kernel::schema::Term<H>;
fn unfold_seed(&self) -> &Self::Term;
fn step_term(&self) -> &Self::Term;
fn productivity_witness(&self) -> &H::HostString;
}
pub trait PredicateDeclaration<H: HostTypes> {
type TypeDefinition: crate::user::type_::TypeDefinition<H>;
fn predicate_input_type(&self) -> &Self::TypeDefinition;
type Term: crate::kernel::schema::Term<H>;
fn evaluator_term(&self) -> &Self::Term;
fn termination_witness(&self) -> &H::HostString;
}
pub trait ParallelDeclaration<H: HostTypes> {
type Partition: crate::bridge::partition::Partition<H>;
fn site_partition(&self) -> &Self::Partition;
fn disjointness_witness(&self) -> &H::HostString;
}
pub trait WittLevelDeclaration<H: HostTypes> {
fn declared_bit_width(&self) -> u64;
fn declared_cycle_size(&self) -> u64;
fn predecessor_level(&self) -> WittLevel;
}
pub trait MintingSession<H: HostTypes> {
fn session_crossing_count(&self) -> u64;
fn session_is_idempotent(&self) -> bool;
}
pub trait PreludeExport<H: HostTypes> {
fn exports_class(&self) -> &H::HostString;
fn export_rust_name(&self) -> &H::HostString;
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullShape<H> {
pub const ABSENT: NullShape<H> = NullShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullPropertyConstraint<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullPropertyConstraint<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullPropertyConstraint<H> {
pub const ABSENT: NullPropertyConstraint<H> = NullPropertyConstraint {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> PropertyConstraint<H> for NullPropertyConstraint<H> {
fn constraint_property(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn constraint_range(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn min_count(&self) -> u64 {
0
}
fn max_count(&self) -> u64 {
0
}
fn surface_keyword(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn surface_production(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullWittLevelShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullWittLevelShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullWittLevelShape<H> {
pub const ABSENT: NullWittLevelShape<H> = NullWittLevelShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullWittLevelShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> WittLevelShape<H> for NullWittLevelShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullEffectShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullEffectShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullEffectShape<H> {
pub const ABSENT: NullEffectShape<H> = NullEffectShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullEffectShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> EffectShape<H> for NullEffectShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullParallelShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullParallelShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullParallelShape<H> {
pub const ABSENT: NullParallelShape<H> = NullParallelShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullParallelShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> ParallelShape<H> for NullParallelShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullStreamShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullStreamShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullStreamShape<H> {
pub const ABSENT: NullStreamShape<H> = NullStreamShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullStreamShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> StreamShape<H> for NullStreamShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullDispatchShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullDispatchShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullDispatchShape<H> {
pub const ABSENT: NullDispatchShape<H> = NullDispatchShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullDispatchShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> DispatchShape<H> for NullDispatchShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullLeaseShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullLeaseShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullLeaseShape<H> {
pub const ABSENT: NullLeaseShape<H> = NullLeaseShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullLeaseShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> LeaseShape<H> for NullLeaseShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullGroundingShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullGroundingShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullGroundingShape<H> {
pub const ABSENT: NullGroundingShape<H> = NullGroundingShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullGroundingShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> GroundingShape<H> for NullGroundingShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullValidationResult<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullValidationResult<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullValidationResult<H> {
pub const ABSENT: NullValidationResult<H> = NullValidationResult {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> ValidationResult<H> for NullValidationResult<H> {
type Shape = NullShape<H>;
fn validation_shape(&self) -> &Self::Shape {
&<NullShape<H>>::ABSENT
}
fn validation_target(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn conforms(&self) -> bool {
false
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullPredicateShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullPredicateShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullPredicateShape<H> {
pub const ABSENT: NullPredicateShape<H> = NullPredicateShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullPredicateShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> PredicateShape<H> for NullPredicateShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullInteractionShape<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullInteractionShape<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullInteractionShape<H> {
pub const ABSENT: NullInteractionShape<H> = NullInteractionShape {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> Shape<H> for NullInteractionShape<H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<H: HostTypes> InteractionShape<H> for NullInteractionShape<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullWitnessDatum<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullWitnessDatum<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullWitnessDatum<H> {
pub const ABSENT: NullWitnessDatum<H> = NullWitnessDatum {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> WitnessDatum<H> for NullWitnessDatum<H> {
fn witness_level(&self) -> u64 {
0
}
fn witness_bytes(&self) -> &H::WitnessBytes {
H::EMPTY_WITNESS_BYTES
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullGroundedCoordinate<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullGroundedCoordinate<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullGroundedCoordinate<H> {
pub const ABSENT: NullGroundedCoordinate<H> = NullGroundedCoordinate {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> GroundedCoordinate<H> for NullGroundedCoordinate<H> {
fn coordinate_level(&self) -> WittLevel {
<WittLevel>::default()
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullGroundedTuple<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullGroundedTuple<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullGroundedTuple<H> {
pub const ABSENT: NullGroundedTuple<H> = NullGroundedTuple {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> GroundedTuple<H> for NullGroundedTuple<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullGroundedValueMarker<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullGroundedValueMarker<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullGroundedValueMarker<H> {
pub const ABSENT: NullGroundedValueMarker<H> = NullGroundedValueMarker {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> GroundedValueMarker<H> for NullGroundedValueMarker<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullValidatedWrapper<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullValidatedWrapper<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullValidatedWrapper<H> {
pub const ABSENT: NullValidatedWrapper<H> = NullValidatedWrapper {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> ValidatedWrapper<H> for NullValidatedWrapper<H> {
fn validated_inner(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullWitnessDerivation<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullWitnessDerivation<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullWitnessDerivation<H> {
pub const ABSENT: NullWitnessDerivation<H> = NullWitnessDerivation {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> WitnessDerivation<H> for NullWitnessDerivation<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullWitnessSiteBudget<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullWitnessSiteBudget<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullWitnessSiteBudget<H> {
pub const ABSENT: NullWitnessSiteBudget<H> = NullWitnessSiteBudget {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> WitnessSiteBudget<H> for NullWitnessSiteBudget<H> {}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullShapeViolationReport<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullShapeViolationReport<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullShapeViolationReport<H> {
pub const ABSENT: NullShapeViolationReport<H> = NullShapeViolationReport {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> ShapeViolationReport<H> for NullShapeViolationReport<H> {
fn shape_iri(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn constraint_iri(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn property_iri(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn expected_range(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn violation_min_count(&self) -> u64 {
0
}
fn violation_max_count(&self) -> u64 {
0
}
fn violation_kind(&self) -> ViolationKind {
<ViolationKind>::default()
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullCompileUnitBuilder<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullCompileUnitBuilder<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullCompileUnitBuilder<H> {
pub const ABSENT: NullCompileUnitBuilder<H> = NullCompileUnitBuilder {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> CompileUnitBuilder<H> for NullCompileUnitBuilder<H> {
type Term = crate::kernel::schema::NullTerm<H>;
fn builder_root_term(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn builder_witt_level_ceiling(&self) -> WittLevel {
<WittLevel>::default()
}
fn builder_thermodynamic_budget(&self) -> H::Decimal {
H::EMPTY_DECIMAL
}
fn builder_target_domains(&self) -> &[VerificationDomain] {
&[]
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullEffectDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullEffectDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullEffectDeclaration<H> {
pub const ABSENT: NullEffectDeclaration<H> = NullEffectDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> EffectDeclaration<H> for NullEffectDeclaration<H> {
fn effect_name(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn target_sites(&self) -> &[u64] {
&[]
}
fn budget_delta(&self) -> i64 {
0
}
fn commutation_flag(&self) -> bool {
false
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullGroundingDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullGroundingDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullGroundingDeclaration<H> {
pub const ABSENT: NullGroundingDeclaration<H> = NullGroundingDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> GroundingDeclaration<H> for NullGroundingDeclaration<H> {
type TypeDefinition = crate::user::type_::NullTypeDefinition<H>;
fn grounding_source_type(&self) -> &Self::TypeDefinition {
&<crate::user::type_::NullTypeDefinition<H>>::ABSENT
}
fn ring_mapping(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn invertibility_contract(&self) -> bool {
false
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullDispatchDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullDispatchDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullDispatchDeclaration<H> {
pub const ABSENT: NullDispatchDeclaration<H> = NullDispatchDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> DispatchDeclaration<H> for NullDispatchDeclaration<H> {
type PredicateExpression = crate::kernel::reduction::NullPredicateExpression<H>;
fn dispatch_predicate(&self) -> &Self::PredicateExpression {
&<crate::kernel::reduction::NullPredicateExpression<H>>::ABSENT
}
type Resolver = crate::bridge::resolver::NullResolver<H>;
fn target_resolver(&self) -> &Self::Resolver {
&<crate::bridge::resolver::NullResolver<H>>::ABSENT
}
fn dispatch_priority(&self) -> u64 {
0
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullLeaseDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullLeaseDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullLeaseDeclaration<H> {
pub const ABSENT: NullLeaseDeclaration<H> = NullLeaseDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> LeaseDeclaration<H> for NullLeaseDeclaration<H> {
fn linear_site(&self) -> u64 {
0
}
fn lease_scope(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullStreamDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullStreamDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullStreamDeclaration<H> {
pub const ABSENT: NullStreamDeclaration<H> = NullStreamDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> StreamDeclaration<H> for NullStreamDeclaration<H> {
type Term = crate::kernel::schema::NullTerm<H>;
fn unfold_seed(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn step_term(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn productivity_witness(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullPredicateDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullPredicateDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullPredicateDeclaration<H> {
pub const ABSENT: NullPredicateDeclaration<H> = NullPredicateDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> PredicateDeclaration<H> for NullPredicateDeclaration<H> {
type TypeDefinition = crate::user::type_::NullTypeDefinition<H>;
fn predicate_input_type(&self) -> &Self::TypeDefinition {
&<crate::user::type_::NullTypeDefinition<H>>::ABSENT
}
type Term = crate::kernel::schema::NullTerm<H>;
fn evaluator_term(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn termination_witness(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullParallelDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullParallelDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullParallelDeclaration<H> {
pub const ABSENT: NullParallelDeclaration<H> = NullParallelDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> ParallelDeclaration<H> for NullParallelDeclaration<H> {
type Partition = crate::enforcement::NullPartition<H>;
fn site_partition(&self) -> &Self::Partition {
&<crate::enforcement::NullPartition<H>>::ABSENT
}
fn disjointness_witness(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullWittLevelDeclaration<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullWittLevelDeclaration<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullWittLevelDeclaration<H> {
pub const ABSENT: NullWittLevelDeclaration<H> = NullWittLevelDeclaration {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> WittLevelDeclaration<H> for NullWittLevelDeclaration<H> {
fn declared_bit_width(&self) -> u64 {
0
}
fn declared_cycle_size(&self) -> u64 {
0
}
fn predecessor_level(&self) -> WittLevel {
<WittLevel>::default()
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullMintingSession<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullMintingSession<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullMintingSession<H> {
pub const ABSENT: NullMintingSession<H> = NullMintingSession {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> MintingSession<H> for NullMintingSession<H> {
fn session_crossing_count(&self) -> u64 {
0
}
fn session_is_idempotent(&self) -> bool {
false
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct NullPreludeExport<H: HostTypes> {
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Default for NullPreludeExport<H> {
fn default() -> Self {
Self {
_phantom: core::marker::PhantomData,
}
}
}
impl<H: HostTypes> NullPreludeExport<H> {
pub const ABSENT: NullPreludeExport<H> = NullPreludeExport {
_phantom: core::marker::PhantomData,
};
}
impl<H: HostTypes> PreludeExport<H> for NullPreludeExport<H> {
fn exports_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn export_rust_name(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug)]
pub struct ShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for ShapeHandle<H> {}
impl<H: HostTypes> Clone for ShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for ShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for ShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for ShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> ShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait ShapeResolver<H: HostTypes> {
fn resolve(&self, handle: ShapeHandle<H>) -> Option<ShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ShapeRecord<H: HostTypes> {
pub target_class: &'static H::HostString,
pub surface_form: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedShape<'r, R: ShapeResolver<H>, H: HostTypes> {
handle: ShapeHandle<H>,
resolver: &'r R,
record: Option<ShapeRecord<H>>,
}
impl<'r, R: ShapeResolver<H>, H: HostTypes> ResolvedShape<'r, R, H> {
#[inline]
pub fn new(handle: ShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> ShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&ShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: ShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
match &self.record {
Some(r) => r.surface_form,
None => H::EMPTY_HOST_STRING,
}
}
}
#[derive(Debug)]
pub struct PropertyConstraintHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for PropertyConstraintHandle<H> {}
impl<H: HostTypes> Clone for PropertyConstraintHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for PropertyConstraintHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for PropertyConstraintHandle<H> {}
impl<H: HostTypes> core::hash::Hash for PropertyConstraintHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> PropertyConstraintHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait PropertyConstraintResolver<H: HostTypes> {
fn resolve(&self, handle: PropertyConstraintHandle<H>) -> Option<PropertyConstraintRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PropertyConstraintRecord<H: HostTypes> {
pub constraint_property: &'static H::HostString,
pub constraint_range: &'static H::HostString,
pub min_count: u64,
pub max_count: u64,
pub surface_keyword: &'static H::HostString,
pub surface_production: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedPropertyConstraint<'r, R: PropertyConstraintResolver<H>, H: HostTypes> {
handle: PropertyConstraintHandle<H>,
resolver: &'r R,
record: Option<PropertyConstraintRecord<H>>,
}
impl<'r, R: PropertyConstraintResolver<H>, H: HostTypes> ResolvedPropertyConstraint<'r, R, H> {
#[inline]
pub fn new(handle: PropertyConstraintHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> PropertyConstraintHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&PropertyConstraintRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: PropertyConstraintResolver<H>, H: HostTypes> PropertyConstraint<H>
for ResolvedPropertyConstraint<'r, R, H>
{
fn constraint_property(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn constraint_range(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn min_count(&self) -> u64 {
match &self.record {
Some(r) => r.min_count,
None => 0,
}
}
fn max_count(&self) -> u64 {
match &self.record {
Some(r) => r.max_count,
None => 0,
}
}
fn surface_keyword(&self) -> &H::HostString {
match &self.record {
Some(r) => r.surface_keyword,
None => H::EMPTY_HOST_STRING,
}
}
fn surface_production(&self) -> &H::HostString {
match &self.record {
Some(r) => r.surface_production,
None => H::EMPTY_HOST_STRING,
}
}
}
#[derive(Debug)]
pub struct WittLevelShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for WittLevelShapeHandle<H> {}
impl<H: HostTypes> Clone for WittLevelShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for WittLevelShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for WittLevelShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for WittLevelShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> WittLevelShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait WittLevelShapeResolver<H: HostTypes> {
fn resolve(&self, handle: WittLevelShapeHandle<H>) -> Option<WittLevelShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct WittLevelShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedWittLevelShape<'r, R: WittLevelShapeResolver<H>, H: HostTypes> {
handle: WittLevelShapeHandle<H>,
resolver: &'r R,
record: Option<WittLevelShapeRecord<H>>,
}
impl<'r, R: WittLevelShapeResolver<H>, H: HostTypes> ResolvedWittLevelShape<'r, R, H> {
#[inline]
pub fn new(handle: WittLevelShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> WittLevelShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&WittLevelShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: WittLevelShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedWittLevelShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: WittLevelShapeResolver<H>, H: HostTypes> WittLevelShape<H>
for ResolvedWittLevelShape<'r, R, H>
{
}
#[derive(Debug)]
pub struct EffectShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for EffectShapeHandle<H> {}
impl<H: HostTypes> Clone for EffectShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for EffectShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for EffectShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for EffectShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> EffectShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait EffectShapeResolver<H: HostTypes> {
fn resolve(&self, handle: EffectShapeHandle<H>) -> Option<EffectShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct EffectShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedEffectShape<'r, R: EffectShapeResolver<H>, H: HostTypes> {
handle: EffectShapeHandle<H>,
resolver: &'r R,
record: Option<EffectShapeRecord<H>>,
}
impl<'r, R: EffectShapeResolver<H>, H: HostTypes> ResolvedEffectShape<'r, R, H> {
#[inline]
pub fn new(handle: EffectShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> EffectShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&EffectShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: EffectShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedEffectShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: EffectShapeResolver<H>, H: HostTypes> EffectShape<H> for ResolvedEffectShape<'r, R, H> {}
#[derive(Debug)]
pub struct ParallelShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for ParallelShapeHandle<H> {}
impl<H: HostTypes> Clone for ParallelShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for ParallelShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for ParallelShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for ParallelShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> ParallelShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait ParallelShapeResolver<H: HostTypes> {
fn resolve(&self, handle: ParallelShapeHandle<H>) -> Option<ParallelShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ParallelShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedParallelShape<'r, R: ParallelShapeResolver<H>, H: HostTypes> {
handle: ParallelShapeHandle<H>,
resolver: &'r R,
record: Option<ParallelShapeRecord<H>>,
}
impl<'r, R: ParallelShapeResolver<H>, H: HostTypes> ResolvedParallelShape<'r, R, H> {
#[inline]
pub fn new(handle: ParallelShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> ParallelShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&ParallelShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: ParallelShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedParallelShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: ParallelShapeResolver<H>, H: HostTypes> ParallelShape<H>
for ResolvedParallelShape<'r, R, H>
{
}
#[derive(Debug)]
pub struct StreamShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for StreamShapeHandle<H> {}
impl<H: HostTypes> Clone for StreamShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for StreamShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for StreamShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for StreamShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> StreamShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait StreamShapeResolver<H: HostTypes> {
fn resolve(&self, handle: StreamShapeHandle<H>) -> Option<StreamShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct StreamShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedStreamShape<'r, R: StreamShapeResolver<H>, H: HostTypes> {
handle: StreamShapeHandle<H>,
resolver: &'r R,
record: Option<StreamShapeRecord<H>>,
}
impl<'r, R: StreamShapeResolver<H>, H: HostTypes> ResolvedStreamShape<'r, R, H> {
#[inline]
pub fn new(handle: StreamShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> StreamShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&StreamShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: StreamShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedStreamShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: StreamShapeResolver<H>, H: HostTypes> StreamShape<H> for ResolvedStreamShape<'r, R, H> {}
#[derive(Debug)]
pub struct DispatchShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for DispatchShapeHandle<H> {}
impl<H: HostTypes> Clone for DispatchShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for DispatchShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for DispatchShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for DispatchShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> DispatchShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait DispatchShapeResolver<H: HostTypes> {
fn resolve(&self, handle: DispatchShapeHandle<H>) -> Option<DispatchShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct DispatchShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedDispatchShape<'r, R: DispatchShapeResolver<H>, H: HostTypes> {
handle: DispatchShapeHandle<H>,
resolver: &'r R,
record: Option<DispatchShapeRecord<H>>,
}
impl<'r, R: DispatchShapeResolver<H>, H: HostTypes> ResolvedDispatchShape<'r, R, H> {
#[inline]
pub fn new(handle: DispatchShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> DispatchShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&DispatchShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: DispatchShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedDispatchShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: DispatchShapeResolver<H>, H: HostTypes> DispatchShape<H>
for ResolvedDispatchShape<'r, R, H>
{
}
#[derive(Debug)]
pub struct LeaseShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for LeaseShapeHandle<H> {}
impl<H: HostTypes> Clone for LeaseShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for LeaseShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for LeaseShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for LeaseShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> LeaseShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait LeaseShapeResolver<H: HostTypes> {
fn resolve(&self, handle: LeaseShapeHandle<H>) -> Option<LeaseShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct LeaseShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedLeaseShape<'r, R: LeaseShapeResolver<H>, H: HostTypes> {
handle: LeaseShapeHandle<H>,
resolver: &'r R,
record: Option<LeaseShapeRecord<H>>,
}
impl<'r, R: LeaseShapeResolver<H>, H: HostTypes> ResolvedLeaseShape<'r, R, H> {
#[inline]
pub fn new(handle: LeaseShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> LeaseShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&LeaseShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: LeaseShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedLeaseShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: LeaseShapeResolver<H>, H: HostTypes> LeaseShape<H> for ResolvedLeaseShape<'r, R, H> {}
#[derive(Debug)]
pub struct GroundingShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for GroundingShapeHandle<H> {}
impl<H: HostTypes> Clone for GroundingShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for GroundingShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for GroundingShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for GroundingShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> GroundingShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait GroundingShapeResolver<H: HostTypes> {
fn resolve(&self, handle: GroundingShapeHandle<H>) -> Option<GroundingShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct GroundingShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedGroundingShape<'r, R: GroundingShapeResolver<H>, H: HostTypes> {
handle: GroundingShapeHandle<H>,
resolver: &'r R,
record: Option<GroundingShapeRecord<H>>,
}
impl<'r, R: GroundingShapeResolver<H>, H: HostTypes> ResolvedGroundingShape<'r, R, H> {
#[inline]
pub fn new(handle: GroundingShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> GroundingShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&GroundingShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: GroundingShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedGroundingShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: GroundingShapeResolver<H>, H: HostTypes> GroundingShape<H>
for ResolvedGroundingShape<'r, R, H>
{
}
#[derive(Debug)]
pub struct ValidationResultHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for ValidationResultHandle<H> {}
impl<H: HostTypes> Clone for ValidationResultHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for ValidationResultHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for ValidationResultHandle<H> {}
impl<H: HostTypes> core::hash::Hash for ValidationResultHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> ValidationResultHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait ValidationResultResolver<H: HostTypes> {
fn resolve(&self, handle: ValidationResultHandle<H>) -> Option<ValidationResultRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ValidationResultRecord<H: HostTypes> {
pub validation_shape_handle: ShapeHandle<H>,
pub validation_target: &'static H::HostString,
pub conforms: bool,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedValidationResult<'r, R: ValidationResultResolver<H>, H: HostTypes> {
handle: ValidationResultHandle<H>,
resolver: &'r R,
record: Option<ValidationResultRecord<H>>,
}
impl<'r, R: ValidationResultResolver<H>, H: HostTypes> ResolvedValidationResult<'r, R, H> {
#[inline]
pub fn new(handle: ValidationResultHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> ValidationResultHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&ValidationResultRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: ValidationResultResolver<H>, H: HostTypes> ValidationResult<H>
for ResolvedValidationResult<'r, R, H>
{
type Shape = NullShape<H>;
fn validation_shape(&self) -> &Self::Shape {
&<NullShape<H>>::ABSENT
}
fn validation_target(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn conforms(&self) -> bool {
match &self.record {
Some(r) => r.conforms,
None => false,
}
}
}
impl<'r, R: ValidationResultResolver<H>, H: HostTypes> ResolvedValidationResult<'r, R, H> {
#[inline]
pub fn resolve_validation_shape<'r2, R2: ShapeResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<ResolvedShape<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(ResolvedShape::new(record.validation_shape_handle, r))
}
}
#[derive(Debug)]
pub struct PredicateShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for PredicateShapeHandle<H> {}
impl<H: HostTypes> Clone for PredicateShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for PredicateShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for PredicateShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for PredicateShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> PredicateShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait PredicateShapeResolver<H: HostTypes> {
fn resolve(&self, handle: PredicateShapeHandle<H>) -> Option<PredicateShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PredicateShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedPredicateShape<'r, R: PredicateShapeResolver<H>, H: HostTypes> {
handle: PredicateShapeHandle<H>,
resolver: &'r R,
record: Option<PredicateShapeRecord<H>>,
}
impl<'r, R: PredicateShapeResolver<H>, H: HostTypes> ResolvedPredicateShape<'r, R, H> {
#[inline]
pub fn new(handle: PredicateShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> PredicateShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&PredicateShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: PredicateShapeResolver<H>, H: HostTypes> Shape<H> for ResolvedPredicateShape<'r, R, H> {
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: PredicateShapeResolver<H>, H: HostTypes> PredicateShape<H>
for ResolvedPredicateShape<'r, R, H>
{
}
#[derive(Debug)]
pub struct InteractionShapeHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for InteractionShapeHandle<H> {}
impl<H: HostTypes> Clone for InteractionShapeHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for InteractionShapeHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for InteractionShapeHandle<H> {}
impl<H: HostTypes> core::hash::Hash for InteractionShapeHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> InteractionShapeHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait InteractionShapeResolver<H: HostTypes> {
fn resolve(&self, handle: InteractionShapeHandle<H>) -> Option<InteractionShapeRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct InteractionShapeRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedInteractionShape<'r, R: InteractionShapeResolver<H>, H: HostTypes> {
handle: InteractionShapeHandle<H>,
resolver: &'r R,
record: Option<InteractionShapeRecord<H>>,
}
impl<'r, R: InteractionShapeResolver<H>, H: HostTypes> ResolvedInteractionShape<'r, R, H> {
#[inline]
pub fn new(handle: InteractionShapeHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> InteractionShapeHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&InteractionShapeRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: InteractionShapeResolver<H>, H: HostTypes> Shape<H>
for ResolvedInteractionShape<'r, R, H>
{
fn target_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
type PropertyConstraint = NullPropertyConstraint<H>;
fn required_property(&self) -> &[Self::PropertyConstraint] {
&[]
}
fn surface_form(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
impl<'r, R: InteractionShapeResolver<H>, H: HostTypes> InteractionShape<H>
for ResolvedInteractionShape<'r, R, H>
{
}
#[derive(Debug)]
pub struct WitnessDatumHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for WitnessDatumHandle<H> {}
impl<H: HostTypes> Clone for WitnessDatumHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for WitnessDatumHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for WitnessDatumHandle<H> {}
impl<H: HostTypes> core::hash::Hash for WitnessDatumHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> WitnessDatumHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait WitnessDatumResolver<H: HostTypes> {
fn resolve(&self, handle: WitnessDatumHandle<H>) -> Option<WitnessDatumRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct WitnessDatumRecord<H: HostTypes> {
pub witness_level: u64,
pub witness_bytes: &'static H::WitnessBytes,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedWitnessDatum<'r, R: WitnessDatumResolver<H>, H: HostTypes> {
handle: WitnessDatumHandle<H>,
resolver: &'r R,
record: Option<WitnessDatumRecord<H>>,
}
impl<'r, R: WitnessDatumResolver<H>, H: HostTypes> ResolvedWitnessDatum<'r, R, H> {
#[inline]
pub fn new(handle: WitnessDatumHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> WitnessDatumHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&WitnessDatumRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: WitnessDatumResolver<H>, H: HostTypes> WitnessDatum<H>
for ResolvedWitnessDatum<'r, R, H>
{
fn witness_level(&self) -> u64 {
match &self.record {
Some(r) => r.witness_level,
None => 0,
}
}
fn witness_bytes(&self) -> &H::WitnessBytes {
match &self.record {
Some(r) => r.witness_bytes,
None => H::EMPTY_WITNESS_BYTES,
}
}
}
#[derive(Debug)]
pub struct GroundedCoordinateHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for GroundedCoordinateHandle<H> {}
impl<H: HostTypes> Clone for GroundedCoordinateHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for GroundedCoordinateHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for GroundedCoordinateHandle<H> {}
impl<H: HostTypes> core::hash::Hash for GroundedCoordinateHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> GroundedCoordinateHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait GroundedCoordinateResolver<H: HostTypes> {
fn resolve(&self, handle: GroundedCoordinateHandle<H>) -> Option<GroundedCoordinateRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct GroundedCoordinateRecord<H: HostTypes> {
pub coordinate_level: WittLevel,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedGroundedCoordinate<'r, R: GroundedCoordinateResolver<H>, H: HostTypes> {
handle: GroundedCoordinateHandle<H>,
resolver: &'r R,
record: Option<GroundedCoordinateRecord<H>>,
}
impl<'r, R: GroundedCoordinateResolver<H>, H: HostTypes> ResolvedGroundedCoordinate<'r, R, H> {
#[inline]
pub fn new(handle: GroundedCoordinateHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> GroundedCoordinateHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&GroundedCoordinateRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: GroundedCoordinateResolver<H>, H: HostTypes> GroundedCoordinate<H>
for ResolvedGroundedCoordinate<'r, R, H>
{
fn coordinate_level(&self) -> WittLevel {
match &self.record {
Some(r) => r.coordinate_level,
None => <WittLevel>::default(),
}
}
}
#[derive(Debug)]
pub struct GroundedTupleHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for GroundedTupleHandle<H> {}
impl<H: HostTypes> Clone for GroundedTupleHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for GroundedTupleHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for GroundedTupleHandle<H> {}
impl<H: HostTypes> core::hash::Hash for GroundedTupleHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> GroundedTupleHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait GroundedTupleResolver<H: HostTypes> {
fn resolve(&self, handle: GroundedTupleHandle<H>) -> Option<GroundedTupleRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct GroundedTupleRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedGroundedTuple<'r, R: GroundedTupleResolver<H>, H: HostTypes> {
handle: GroundedTupleHandle<H>,
resolver: &'r R,
record: Option<GroundedTupleRecord<H>>,
}
impl<'r, R: GroundedTupleResolver<H>, H: HostTypes> ResolvedGroundedTuple<'r, R, H> {
#[inline]
pub fn new(handle: GroundedTupleHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> GroundedTupleHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&GroundedTupleRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: GroundedTupleResolver<H>, H: HostTypes> GroundedTuple<H>
for ResolvedGroundedTuple<'r, R, H>
{
}
#[derive(Debug)]
pub struct GroundedValueMarkerHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for GroundedValueMarkerHandle<H> {}
impl<H: HostTypes> Clone for GroundedValueMarkerHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for GroundedValueMarkerHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for GroundedValueMarkerHandle<H> {}
impl<H: HostTypes> core::hash::Hash for GroundedValueMarkerHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> GroundedValueMarkerHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait GroundedValueMarkerResolver<H: HostTypes> {
fn resolve(&self, handle: GroundedValueMarkerHandle<H>)
-> Option<GroundedValueMarkerRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct GroundedValueMarkerRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedGroundedValueMarker<'r, R: GroundedValueMarkerResolver<H>, H: HostTypes> {
handle: GroundedValueMarkerHandle<H>,
resolver: &'r R,
record: Option<GroundedValueMarkerRecord<H>>,
}
impl<'r, R: GroundedValueMarkerResolver<H>, H: HostTypes> ResolvedGroundedValueMarker<'r, R, H> {
#[inline]
pub fn new(handle: GroundedValueMarkerHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> GroundedValueMarkerHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&GroundedValueMarkerRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: GroundedValueMarkerResolver<H>, H: HostTypes> GroundedValueMarker<H>
for ResolvedGroundedValueMarker<'r, R, H>
{
}
#[derive(Debug)]
pub struct ValidatedWrapperHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for ValidatedWrapperHandle<H> {}
impl<H: HostTypes> Clone for ValidatedWrapperHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for ValidatedWrapperHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for ValidatedWrapperHandle<H> {}
impl<H: HostTypes> core::hash::Hash for ValidatedWrapperHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> ValidatedWrapperHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait ValidatedWrapperResolver<H: HostTypes> {
fn resolve(&self, handle: ValidatedWrapperHandle<H>) -> Option<ValidatedWrapperRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ValidatedWrapperRecord<H: HostTypes> {
pub validated_inner: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedValidatedWrapper<'r, R: ValidatedWrapperResolver<H>, H: HostTypes> {
handle: ValidatedWrapperHandle<H>,
resolver: &'r R,
record: Option<ValidatedWrapperRecord<H>>,
}
impl<'r, R: ValidatedWrapperResolver<H>, H: HostTypes> ResolvedValidatedWrapper<'r, R, H> {
#[inline]
pub fn new(handle: ValidatedWrapperHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> ValidatedWrapperHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&ValidatedWrapperRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: ValidatedWrapperResolver<H>, H: HostTypes> ValidatedWrapper<H>
for ResolvedValidatedWrapper<'r, R, H>
{
fn validated_inner(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
}
#[derive(Debug)]
pub struct WitnessDerivationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for WitnessDerivationHandle<H> {}
impl<H: HostTypes> Clone for WitnessDerivationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for WitnessDerivationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for WitnessDerivationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for WitnessDerivationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> WitnessDerivationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait WitnessDerivationResolver<H: HostTypes> {
fn resolve(&self, handle: WitnessDerivationHandle<H>) -> Option<WitnessDerivationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct WitnessDerivationRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedWitnessDerivation<'r, R: WitnessDerivationResolver<H>, H: HostTypes> {
handle: WitnessDerivationHandle<H>,
resolver: &'r R,
record: Option<WitnessDerivationRecord<H>>,
}
impl<'r, R: WitnessDerivationResolver<H>, H: HostTypes> ResolvedWitnessDerivation<'r, R, H> {
#[inline]
pub fn new(handle: WitnessDerivationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> WitnessDerivationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&WitnessDerivationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: WitnessDerivationResolver<H>, H: HostTypes> WitnessDerivation<H>
for ResolvedWitnessDerivation<'r, R, H>
{
}
#[derive(Debug)]
pub struct WitnessSiteBudgetHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for WitnessSiteBudgetHandle<H> {}
impl<H: HostTypes> Clone for WitnessSiteBudgetHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for WitnessSiteBudgetHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for WitnessSiteBudgetHandle<H> {}
impl<H: HostTypes> core::hash::Hash for WitnessSiteBudgetHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> WitnessSiteBudgetHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait WitnessSiteBudgetResolver<H: HostTypes> {
fn resolve(&self, handle: WitnessSiteBudgetHandle<H>) -> Option<WitnessSiteBudgetRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct WitnessSiteBudgetRecord<H: HostTypes> {
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedWitnessSiteBudget<'r, R: WitnessSiteBudgetResolver<H>, H: HostTypes> {
handle: WitnessSiteBudgetHandle<H>,
resolver: &'r R,
record: Option<WitnessSiteBudgetRecord<H>>,
}
impl<'r, R: WitnessSiteBudgetResolver<H>, H: HostTypes> ResolvedWitnessSiteBudget<'r, R, H> {
#[inline]
pub fn new(handle: WitnessSiteBudgetHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> WitnessSiteBudgetHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&WitnessSiteBudgetRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: WitnessSiteBudgetResolver<H>, H: HostTypes> WitnessSiteBudget<H>
for ResolvedWitnessSiteBudget<'r, R, H>
{
}
#[derive(Debug)]
pub struct ShapeViolationReportHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for ShapeViolationReportHandle<H> {}
impl<H: HostTypes> Clone for ShapeViolationReportHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for ShapeViolationReportHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for ShapeViolationReportHandle<H> {}
impl<H: HostTypes> core::hash::Hash for ShapeViolationReportHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> ShapeViolationReportHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait ShapeViolationReportResolver<H: HostTypes> {
fn resolve(
&self,
handle: ShapeViolationReportHandle<H>,
) -> Option<ShapeViolationReportRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ShapeViolationReportRecord<H: HostTypes> {
pub shape_iri: &'static H::HostString,
pub constraint_iri: &'static H::HostString,
pub property_iri: &'static H::HostString,
pub expected_range: &'static H::HostString,
pub violation_min_count: u64,
pub violation_max_count: u64,
pub violation_kind: ViolationKind,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedShapeViolationReport<'r, R: ShapeViolationReportResolver<H>, H: HostTypes> {
handle: ShapeViolationReportHandle<H>,
resolver: &'r R,
record: Option<ShapeViolationReportRecord<H>>,
}
impl<'r, R: ShapeViolationReportResolver<H>, H: HostTypes> ResolvedShapeViolationReport<'r, R, H> {
#[inline]
pub fn new(handle: ShapeViolationReportHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> ShapeViolationReportHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&ShapeViolationReportRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: ShapeViolationReportResolver<H>, H: HostTypes> ShapeViolationReport<H>
for ResolvedShapeViolationReport<'r, R, H>
{
fn shape_iri(&self) -> &H::HostString {
match &self.record {
Some(r) => r.shape_iri,
None => H::EMPTY_HOST_STRING,
}
}
fn constraint_iri(&self) -> &H::HostString {
match &self.record {
Some(r) => r.constraint_iri,
None => H::EMPTY_HOST_STRING,
}
}
fn property_iri(&self) -> &H::HostString {
match &self.record {
Some(r) => r.property_iri,
None => H::EMPTY_HOST_STRING,
}
}
fn expected_range(&self) -> &H::HostString {
match &self.record {
Some(r) => r.expected_range,
None => H::EMPTY_HOST_STRING,
}
}
fn violation_min_count(&self) -> u64 {
match &self.record {
Some(r) => r.violation_min_count,
None => 0,
}
}
fn violation_max_count(&self) -> u64 {
match &self.record {
Some(r) => r.violation_max_count,
None => 0,
}
}
fn violation_kind(&self) -> ViolationKind {
match &self.record {
Some(r) => r.violation_kind,
None => <ViolationKind>::default(),
}
}
}
#[derive(Debug)]
pub struct CompileUnitBuilderHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for CompileUnitBuilderHandle<H> {}
impl<H: HostTypes> Clone for CompileUnitBuilderHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for CompileUnitBuilderHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for CompileUnitBuilderHandle<H> {}
impl<H: HostTypes> core::hash::Hash for CompileUnitBuilderHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> CompileUnitBuilderHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait CompileUnitBuilderResolver<H: HostTypes> {
fn resolve(&self, handle: CompileUnitBuilderHandle<H>) -> Option<CompileUnitBuilderRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct CompileUnitBuilderRecord<H: HostTypes> {
pub builder_root_term_handle: crate::kernel::schema::TermHandle<H>,
pub builder_witt_level_ceiling: WittLevel,
pub builder_thermodynamic_budget: H::Decimal,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedCompileUnitBuilder<'r, R: CompileUnitBuilderResolver<H>, H: HostTypes> {
handle: CompileUnitBuilderHandle<H>,
resolver: &'r R,
record: Option<CompileUnitBuilderRecord<H>>,
}
impl<'r, R: CompileUnitBuilderResolver<H>, H: HostTypes> ResolvedCompileUnitBuilder<'r, R, H> {
#[inline]
pub fn new(handle: CompileUnitBuilderHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> CompileUnitBuilderHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&CompileUnitBuilderRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: CompileUnitBuilderResolver<H>, H: HostTypes> CompileUnitBuilder<H>
for ResolvedCompileUnitBuilder<'r, R, H>
{
type Term = crate::kernel::schema::NullTerm<H>;
fn builder_root_term(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn builder_witt_level_ceiling(&self) -> WittLevel {
match &self.record {
Some(r) => r.builder_witt_level_ceiling,
None => <WittLevel>::default(),
}
}
fn builder_thermodynamic_budget(&self) -> H::Decimal {
match &self.record {
Some(r) => r.builder_thermodynamic_budget,
None => H::EMPTY_DECIMAL,
}
}
fn builder_target_domains(&self) -> &[VerificationDomain] {
&[]
}
}
impl<'r, R: CompileUnitBuilderResolver<H>, H: HostTypes> ResolvedCompileUnitBuilder<'r, R, H> {
#[inline]
pub fn resolve_builder_root_term<'r2, R2: crate::kernel::schema::TermResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::kernel::schema::ResolvedTerm<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::kernel::schema::ResolvedTerm::new(
record.builder_root_term_handle,
r,
))
}
}
#[derive(Debug)]
pub struct EffectDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for EffectDeclarationHandle<H> {}
impl<H: HostTypes> Clone for EffectDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for EffectDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for EffectDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for EffectDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> EffectDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait EffectDeclarationResolver<H: HostTypes> {
fn resolve(&self, handle: EffectDeclarationHandle<H>) -> Option<EffectDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct EffectDeclarationRecord<H: HostTypes> {
pub effect_name: &'static H::HostString,
pub budget_delta: i64,
pub commutation_flag: bool,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedEffectDeclaration<'r, R: EffectDeclarationResolver<H>, H: HostTypes> {
handle: EffectDeclarationHandle<H>,
resolver: &'r R,
record: Option<EffectDeclarationRecord<H>>,
}
impl<'r, R: EffectDeclarationResolver<H>, H: HostTypes> ResolvedEffectDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: EffectDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> EffectDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&EffectDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: EffectDeclarationResolver<H>, H: HostTypes> EffectDeclaration<H>
for ResolvedEffectDeclaration<'r, R, H>
{
fn effect_name(&self) -> &H::HostString {
match &self.record {
Some(r) => r.effect_name,
None => H::EMPTY_HOST_STRING,
}
}
fn target_sites(&self) -> &[u64] {
&[]
}
fn budget_delta(&self) -> i64 {
match &self.record {
Some(r) => r.budget_delta,
None => 0,
}
}
fn commutation_flag(&self) -> bool {
match &self.record {
Some(r) => r.commutation_flag,
None => false,
}
}
}
#[derive(Debug)]
pub struct GroundingDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for GroundingDeclarationHandle<H> {}
impl<H: HostTypes> Clone for GroundingDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for GroundingDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for GroundingDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for GroundingDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> GroundingDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait GroundingDeclarationResolver<H: HostTypes> {
fn resolve(
&self,
handle: GroundingDeclarationHandle<H>,
) -> Option<GroundingDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct GroundingDeclarationRecord<H: HostTypes> {
pub grounding_source_type_handle: crate::user::type_::TypeDefinitionHandle<H>,
pub ring_mapping: &'static H::HostString,
pub invertibility_contract: bool,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedGroundingDeclaration<'r, R: GroundingDeclarationResolver<H>, H: HostTypes> {
handle: GroundingDeclarationHandle<H>,
resolver: &'r R,
record: Option<GroundingDeclarationRecord<H>>,
}
impl<'r, R: GroundingDeclarationResolver<H>, H: HostTypes> ResolvedGroundingDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: GroundingDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> GroundingDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&GroundingDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: GroundingDeclarationResolver<H>, H: HostTypes> GroundingDeclaration<H>
for ResolvedGroundingDeclaration<'r, R, H>
{
type TypeDefinition = crate::user::type_::NullTypeDefinition<H>;
fn grounding_source_type(&self) -> &Self::TypeDefinition {
&<crate::user::type_::NullTypeDefinition<H>>::ABSENT
}
fn ring_mapping(&self) -> &H::HostString {
match &self.record {
Some(r) => r.ring_mapping,
None => H::EMPTY_HOST_STRING,
}
}
fn invertibility_contract(&self) -> bool {
match &self.record {
Some(r) => r.invertibility_contract,
None => false,
}
}
}
impl<'r, R: GroundingDeclarationResolver<H>, H: HostTypes> ResolvedGroundingDeclaration<'r, R, H> {
#[inline]
pub fn resolve_grounding_source_type<'r2, R2: crate::user::type_::TypeDefinitionResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::user::type_::ResolvedTypeDefinition<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::user::type_::ResolvedTypeDefinition::new(
record.grounding_source_type_handle,
r,
))
}
}
#[derive(Debug)]
pub struct DispatchDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for DispatchDeclarationHandle<H> {}
impl<H: HostTypes> Clone for DispatchDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for DispatchDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for DispatchDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for DispatchDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> DispatchDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait DispatchDeclarationResolver<H: HostTypes> {
fn resolve(&self, handle: DispatchDeclarationHandle<H>)
-> Option<DispatchDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct DispatchDeclarationRecord<H: HostTypes> {
pub dispatch_predicate_handle: crate::kernel::reduction::PredicateExpressionHandle<H>,
pub target_resolver_handle: crate::bridge::resolver::ResolverHandle<H>,
pub dispatch_priority: u64,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedDispatchDeclaration<'r, R: DispatchDeclarationResolver<H>, H: HostTypes> {
handle: DispatchDeclarationHandle<H>,
resolver: &'r R,
record: Option<DispatchDeclarationRecord<H>>,
}
impl<'r, R: DispatchDeclarationResolver<H>, H: HostTypes> ResolvedDispatchDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: DispatchDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> DispatchDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&DispatchDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: DispatchDeclarationResolver<H>, H: HostTypes> DispatchDeclaration<H>
for ResolvedDispatchDeclaration<'r, R, H>
{
type PredicateExpression = crate::kernel::reduction::NullPredicateExpression<H>;
fn dispatch_predicate(&self) -> &Self::PredicateExpression {
&<crate::kernel::reduction::NullPredicateExpression<H>>::ABSENT
}
type Resolver = crate::bridge::resolver::NullResolver<H>;
fn target_resolver(&self) -> &Self::Resolver {
&<crate::bridge::resolver::NullResolver<H>>::ABSENT
}
fn dispatch_priority(&self) -> u64 {
match &self.record {
Some(r) => r.dispatch_priority,
None => 0,
}
}
}
impl<'r, R: DispatchDeclarationResolver<H>, H: HostTypes> ResolvedDispatchDeclaration<'r, R, H> {
#[inline]
pub fn resolve_dispatch_predicate<
'r2,
R2: crate::kernel::reduction::PredicateExpressionResolver<H>,
>(
&self,
r: &'r2 R2,
) -> Option<crate::kernel::reduction::ResolvedPredicateExpression<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::kernel::reduction::ResolvedPredicateExpression::new(
record.dispatch_predicate_handle,
r,
))
}
#[inline]
pub fn resolve_target_resolver<'r2, R2: crate::bridge::resolver::ResolverResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::bridge::resolver::ResolvedResolver<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::bridge::resolver::ResolvedResolver::new(
record.target_resolver_handle,
r,
))
}
}
#[derive(Debug)]
pub struct LeaseDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for LeaseDeclarationHandle<H> {}
impl<H: HostTypes> Clone for LeaseDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for LeaseDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for LeaseDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for LeaseDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> LeaseDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait LeaseDeclarationResolver<H: HostTypes> {
fn resolve(&self, handle: LeaseDeclarationHandle<H>) -> Option<LeaseDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct LeaseDeclarationRecord<H: HostTypes> {
pub linear_site: u64,
pub lease_scope: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedLeaseDeclaration<'r, R: LeaseDeclarationResolver<H>, H: HostTypes> {
handle: LeaseDeclarationHandle<H>,
resolver: &'r R,
record: Option<LeaseDeclarationRecord<H>>,
}
impl<'r, R: LeaseDeclarationResolver<H>, H: HostTypes> ResolvedLeaseDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: LeaseDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> LeaseDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&LeaseDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: LeaseDeclarationResolver<H>, H: HostTypes> LeaseDeclaration<H>
for ResolvedLeaseDeclaration<'r, R, H>
{
fn linear_site(&self) -> u64 {
match &self.record {
Some(r) => r.linear_site,
None => 0,
}
}
fn lease_scope(&self) -> &H::HostString {
match &self.record {
Some(r) => r.lease_scope,
None => H::EMPTY_HOST_STRING,
}
}
}
#[derive(Debug)]
pub struct StreamDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for StreamDeclarationHandle<H> {}
impl<H: HostTypes> Clone for StreamDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for StreamDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for StreamDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for StreamDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> StreamDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait StreamDeclarationResolver<H: HostTypes> {
fn resolve(&self, handle: StreamDeclarationHandle<H>) -> Option<StreamDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct StreamDeclarationRecord<H: HostTypes> {
pub unfold_seed_handle: crate::kernel::schema::TermHandle<H>,
pub step_term_handle: crate::kernel::schema::TermHandle<H>,
pub productivity_witness: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedStreamDeclaration<'r, R: StreamDeclarationResolver<H>, H: HostTypes> {
handle: StreamDeclarationHandle<H>,
resolver: &'r R,
record: Option<StreamDeclarationRecord<H>>,
}
impl<'r, R: StreamDeclarationResolver<H>, H: HostTypes> ResolvedStreamDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: StreamDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> StreamDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&StreamDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: StreamDeclarationResolver<H>, H: HostTypes> StreamDeclaration<H>
for ResolvedStreamDeclaration<'r, R, H>
{
type Term = crate::kernel::schema::NullTerm<H>;
fn unfold_seed(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn step_term(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn productivity_witness(&self) -> &H::HostString {
match &self.record {
Some(r) => r.productivity_witness,
None => H::EMPTY_HOST_STRING,
}
}
}
impl<'r, R: StreamDeclarationResolver<H>, H: HostTypes> ResolvedStreamDeclaration<'r, R, H> {
#[inline]
pub fn resolve_unfold_seed<'r2, R2: crate::kernel::schema::TermResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::kernel::schema::ResolvedTerm<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::kernel::schema::ResolvedTerm::new(
record.unfold_seed_handle,
r,
))
}
#[inline]
pub fn resolve_step_term<'r2, R2: crate::kernel::schema::TermResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::kernel::schema::ResolvedTerm<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::kernel::schema::ResolvedTerm::new(
record.step_term_handle,
r,
))
}
}
#[derive(Debug)]
pub struct PredicateDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for PredicateDeclarationHandle<H> {}
impl<H: HostTypes> Clone for PredicateDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for PredicateDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for PredicateDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for PredicateDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> PredicateDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait PredicateDeclarationResolver<H: HostTypes> {
fn resolve(
&self,
handle: PredicateDeclarationHandle<H>,
) -> Option<PredicateDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PredicateDeclarationRecord<H: HostTypes> {
pub predicate_input_type_handle: crate::user::type_::TypeDefinitionHandle<H>,
pub evaluator_term_handle: crate::kernel::schema::TermHandle<H>,
pub termination_witness: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedPredicateDeclaration<'r, R: PredicateDeclarationResolver<H>, H: HostTypes> {
handle: PredicateDeclarationHandle<H>,
resolver: &'r R,
record: Option<PredicateDeclarationRecord<H>>,
}
impl<'r, R: PredicateDeclarationResolver<H>, H: HostTypes> ResolvedPredicateDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: PredicateDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> PredicateDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&PredicateDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: PredicateDeclarationResolver<H>, H: HostTypes> PredicateDeclaration<H>
for ResolvedPredicateDeclaration<'r, R, H>
{
type TypeDefinition = crate::user::type_::NullTypeDefinition<H>;
fn predicate_input_type(&self) -> &Self::TypeDefinition {
&<crate::user::type_::NullTypeDefinition<H>>::ABSENT
}
type Term = crate::kernel::schema::NullTerm<H>;
fn evaluator_term(&self) -> &Self::Term {
&<crate::kernel::schema::NullTerm<H>>::ABSENT
}
fn termination_witness(&self) -> &H::HostString {
match &self.record {
Some(r) => r.termination_witness,
None => H::EMPTY_HOST_STRING,
}
}
}
impl<'r, R: PredicateDeclarationResolver<H>, H: HostTypes> ResolvedPredicateDeclaration<'r, R, H> {
#[inline]
pub fn resolve_predicate_input_type<'r2, R2: crate::user::type_::TypeDefinitionResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::user::type_::ResolvedTypeDefinition<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::user::type_::ResolvedTypeDefinition::new(
record.predicate_input_type_handle,
r,
))
}
#[inline]
pub fn resolve_evaluator_term<'r2, R2: crate::kernel::schema::TermResolver<H>>(
&self,
r: &'r2 R2,
) -> Option<crate::kernel::schema::ResolvedTerm<'r2, R2, H>> {
let record = self.record.as_ref()?;
Some(crate::kernel::schema::ResolvedTerm::new(
record.evaluator_term_handle,
r,
))
}
}
#[derive(Debug)]
pub struct ParallelDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for ParallelDeclarationHandle<H> {}
impl<H: HostTypes> Clone for ParallelDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for ParallelDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for ParallelDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for ParallelDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> ParallelDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait ParallelDeclarationResolver<H: HostTypes> {
fn resolve(&self, handle: ParallelDeclarationHandle<H>)
-> Option<ParallelDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct ParallelDeclarationRecord<H: HostTypes> {
pub disjointness_witness: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedParallelDeclaration<'r, R: ParallelDeclarationResolver<H>, H: HostTypes> {
handle: ParallelDeclarationHandle<H>,
resolver: &'r R,
record: Option<ParallelDeclarationRecord<H>>,
}
impl<'r, R: ParallelDeclarationResolver<H>, H: HostTypes> ResolvedParallelDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: ParallelDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> ParallelDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&ParallelDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: ParallelDeclarationResolver<H>, H: HostTypes> ParallelDeclaration<H>
for ResolvedParallelDeclaration<'r, R, H>
{
type Partition = crate::enforcement::NullPartition<H>;
fn site_partition(&self) -> &Self::Partition {
&<crate::enforcement::NullPartition<H>>::ABSENT
}
fn disjointness_witness(&self) -> &H::HostString {
match &self.record {
Some(r) => r.disjointness_witness,
None => H::EMPTY_HOST_STRING,
}
}
}
#[derive(Debug)]
pub struct WittLevelDeclarationHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for WittLevelDeclarationHandle<H> {}
impl<H: HostTypes> Clone for WittLevelDeclarationHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for WittLevelDeclarationHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for WittLevelDeclarationHandle<H> {}
impl<H: HostTypes> core::hash::Hash for WittLevelDeclarationHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> WittLevelDeclarationHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait WittLevelDeclarationResolver<H: HostTypes> {
fn resolve(
&self,
handle: WittLevelDeclarationHandle<H>,
) -> Option<WittLevelDeclarationRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct WittLevelDeclarationRecord<H: HostTypes> {
pub declared_bit_width: u64,
pub declared_cycle_size: u64,
pub predecessor_level: WittLevel,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedWittLevelDeclaration<'r, R: WittLevelDeclarationResolver<H>, H: HostTypes> {
handle: WittLevelDeclarationHandle<H>,
resolver: &'r R,
record: Option<WittLevelDeclarationRecord<H>>,
}
impl<'r, R: WittLevelDeclarationResolver<H>, H: HostTypes> ResolvedWittLevelDeclaration<'r, R, H> {
#[inline]
pub fn new(handle: WittLevelDeclarationHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> WittLevelDeclarationHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&WittLevelDeclarationRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: WittLevelDeclarationResolver<H>, H: HostTypes> WittLevelDeclaration<H>
for ResolvedWittLevelDeclaration<'r, R, H>
{
fn declared_bit_width(&self) -> u64 {
match &self.record {
Some(r) => r.declared_bit_width,
None => 0,
}
}
fn declared_cycle_size(&self) -> u64 {
match &self.record {
Some(r) => r.declared_cycle_size,
None => 0,
}
}
fn predecessor_level(&self) -> WittLevel {
match &self.record {
Some(r) => r.predecessor_level,
None => <WittLevel>::default(),
}
}
}
#[derive(Debug)]
pub struct MintingSessionHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for MintingSessionHandle<H> {}
impl<H: HostTypes> Clone for MintingSessionHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for MintingSessionHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for MintingSessionHandle<H> {}
impl<H: HostTypes> core::hash::Hash for MintingSessionHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> MintingSessionHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait MintingSessionResolver<H: HostTypes> {
fn resolve(&self, handle: MintingSessionHandle<H>) -> Option<MintingSessionRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct MintingSessionRecord<H: HostTypes> {
pub session_crossing_count: u64,
pub session_is_idempotent: bool,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedMintingSession<'r, R: MintingSessionResolver<H>, H: HostTypes> {
handle: MintingSessionHandle<H>,
resolver: &'r R,
record: Option<MintingSessionRecord<H>>,
}
impl<'r, R: MintingSessionResolver<H>, H: HostTypes> ResolvedMintingSession<'r, R, H> {
#[inline]
pub fn new(handle: MintingSessionHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> MintingSessionHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&MintingSessionRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: MintingSessionResolver<H>, H: HostTypes> MintingSession<H>
for ResolvedMintingSession<'r, R, H>
{
fn session_crossing_count(&self) -> u64 {
match &self.record {
Some(r) => r.session_crossing_count,
None => 0,
}
}
fn session_is_idempotent(&self) -> bool {
match &self.record {
Some(r) => r.session_is_idempotent,
None => false,
}
}
}
#[derive(Debug)]
pub struct PreludeExportHandle<H: HostTypes> {
pub fingerprint: crate::enforcement::ContentFingerprint,
_phantom: core::marker::PhantomData<H>,
}
impl<H: HostTypes> Copy for PreludeExportHandle<H> {}
impl<H: HostTypes> Clone for PreludeExportHandle<H> {
#[inline]
fn clone(&self) -> Self {
*self
}
}
impl<H: HostTypes> PartialEq for PreludeExportHandle<H> {
#[inline]
fn eq(&self, other: &Self) -> bool {
self.fingerprint == other.fingerprint
}
}
impl<H: HostTypes> Eq for PreludeExportHandle<H> {}
impl<H: HostTypes> core::hash::Hash for PreludeExportHandle<H> {
#[inline]
fn hash<S: core::hash::Hasher>(&self, state: &mut S) {
self.fingerprint.hash(state);
}
}
impl<H: HostTypes> PreludeExportHandle<H> {
#[inline]
#[must_use]
pub const fn new(fingerprint: crate::enforcement::ContentFingerprint) -> Self {
Self {
fingerprint,
_phantom: core::marker::PhantomData,
}
}
}
pub trait PreludeExportResolver<H: HostTypes> {
fn resolve(&self, handle: PreludeExportHandle<H>) -> Option<PreludeExportRecord<H>>;
}
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub struct PreludeExportRecord<H: HostTypes> {
pub exports_class: &'static H::HostString,
pub export_rust_name: &'static H::HostString,
#[doc(hidden)]
pub _phantom: core::marker::PhantomData<H>,
}
pub struct ResolvedPreludeExport<'r, R: PreludeExportResolver<H>, H: HostTypes> {
handle: PreludeExportHandle<H>,
resolver: &'r R,
record: Option<PreludeExportRecord<H>>,
}
impl<'r, R: PreludeExportResolver<H>, H: HostTypes> ResolvedPreludeExport<'r, R, H> {
#[inline]
pub fn new(handle: PreludeExportHandle<H>, resolver: &'r R) -> Self {
let record = resolver.resolve(handle);
Self {
handle,
resolver,
record,
}
}
#[inline]
#[must_use]
pub const fn handle(&self) -> PreludeExportHandle<H> {
self.handle
}
#[inline]
#[must_use]
pub const fn resolver(&self) -> &'r R {
self.resolver
}
#[inline]
#[must_use]
pub const fn record(&self) -> Option<&PreludeExportRecord<H>> {
self.record.as_ref()
}
}
impl<'r, R: PreludeExportResolver<H>, H: HostTypes> PreludeExport<H>
for ResolvedPreludeExport<'r, R, H>
{
fn exports_class(&self) -> &H::HostString {
H::EMPTY_HOST_STRING
}
fn export_rust_name(&self) -> &H::HostString {
match &self.record {
Some(r) => r.export_rust_name,
None => H::EMPTY_HOST_STRING,
}
}
}
pub mod compile_unit_shape {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/compileUnit_rootTerm_constraint",
"https://uor.foundation/conformance/compileUnit_unitWittLevel_constraint",
"https://uor.foundation/conformance/compileUnit_thermodynamicBudget_constraint",
"https://uor.foundation/conformance/compileUnit_targetDomains_constraint",
];
pub const SURFACE_FORM: &str = "compile-unit-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/reduction/CompileUnit";
}
pub mod compile_unit_root_term_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/reduction/rootTerm";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/Term";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "root_term";
pub const SURFACE_PRODUCTION: &str = "program";
}
pub mod compile_unit_unit_witt_level_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/reduction/unitWittLevel";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/WittLevel";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "witt_level_ceiling";
pub const SURFACE_PRODUCTION: &str = "name";
}
pub mod compile_unit_thermodynamic_budget_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/reduction/thermodynamicBudget";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#decimal";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "thermodynamic_budget";
pub const SURFACE_PRODUCTION: &str = "decimal-literal";
}
pub mod compile_unit_target_domains_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/reduction/targetDomains";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/op/VerificationDomain";
pub const MAX_COUNT: i64 = 0;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "target_domains";
pub const SURFACE_PRODUCTION: &str = "domain-set";
}
pub mod missing {}
pub mod type_mismatch {}
pub mod cardinality_violation {}
pub mod value_check {}
pub mod level_mismatch {}
pub mod dispatch_shape_instance {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/dispatch_predicate_constraint",
"https://uor.foundation/conformance/dispatch_target_constraint",
"https://uor.foundation/conformance/dispatch_priority_constraint",
];
pub const SURFACE_FORM: &str = "dispatch-rule-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/predicate/DispatchRule";
}
pub mod dispatch_predicate_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/predicate/dispatchPredicate";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/Term";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "predicate";
pub const SURFACE_PRODUCTION: &str = "term";
}
pub mod dispatch_target_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/predicate/dispatchTarget";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/resolver/Resolver";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "target_resolver";
pub const SURFACE_PRODUCTION: &str = "name";
}
pub mod dispatch_priority_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/predicate/dispatchPriority";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#nonNegativeInteger";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "priority";
pub const SURFACE_PRODUCTION: &str = "integer-literal";
}
pub mod witt_level_shape_instance {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/wittLevel_bitWidth_constraint",
"https://uor.foundation/conformance/wittLevel_cycleSize_constraint",
"https://uor.foundation/conformance/wittLevel_predecessorLevel_constraint",
];
pub const SURFACE_FORM: &str = "witt-level-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/schema/WittLevel";
}
pub mod witt_level_bit_width_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/schema/bitsWidth";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#positiveInteger";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "bit_width";
pub const SURFACE_PRODUCTION: &str = "integer-literal";
}
pub mod witt_level_cycle_size_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/schema/cycleSize";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#nonNegativeInteger";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "cycle_size";
pub const SURFACE_PRODUCTION: &str = "integer-literal";
}
pub mod witt_level_predecessor_level_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/schema/wittLevelPredecessor";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/WittLevel";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "predecessor_level";
pub const SURFACE_PRODUCTION: &str = "name";
}
pub mod predicate_shape_instance {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/predicate_inputType_constraint",
"https://uor.foundation/conformance/predicate_evaluator_constraint",
"https://uor.foundation/conformance/predicate_terminationWitness_constraint",
];
pub const SURFACE_FORM: &str = "predicate-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/predicate/Predicate";
}
pub mod predicate_input_type_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/predicate/evaluatesOver";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/type/TypeDefinition";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "input_type";
pub const SURFACE_PRODUCTION: &str = "type-expr";
}
pub mod predicate_evaluator_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/predicate/evaluatorTerm";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/Term";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "evaluator";
pub const SURFACE_PRODUCTION: &str = "term";
}
pub mod predicate_termination_witness_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/predicate/terminationWitness";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#string";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "termination_witness";
pub const SURFACE_PRODUCTION: &str = "string-literal";
}
pub mod parallel_shape_instance {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/parallel_sitePartition_constraint",
"https://uor.foundation/conformance/parallel_disjointnessWitness_constraint",
];
pub const SURFACE_FORM: &str = "parallel-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/parallel/ParallelProduct";
}
pub mod parallel_site_partition_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/parallel/sitePartition";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/partition/Partition";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "site_partition";
pub const SURFACE_PRODUCTION: &str = "name";
}
pub mod parallel_disjointness_witness_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/parallel/disjointnessWitness";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#string";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "disjointness_witness";
pub const SURFACE_PRODUCTION: &str = "string-literal";
}
pub mod stream_shape_instance {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/stream_unfoldSeed_constraint",
"https://uor.foundation/conformance/stream_step_constraint",
"https://uor.foundation/conformance/stream_productivityWitness_constraint",
];
pub const SURFACE_FORM: &str = "stream-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/stream/ProductiveStream";
}
pub mod stream_unfold_seed_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/stream/unfoldSeed";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/Term";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "unfold_seed";
pub const SURFACE_PRODUCTION: &str = "term";
}
pub mod stream_step_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/stream/stepTerm";
pub const CONSTRAINT_RANGE: &str = "https://uor.foundation/schema/Term";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "step";
pub const SURFACE_PRODUCTION: &str = "term";
}
pub mod stream_productivity_witness_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/stream/productivityWitness";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#string";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "productivity_witness";
pub const SURFACE_PRODUCTION: &str = "string-literal";
}
pub mod lease_shape_instance {
pub const REQUIRED_PROPERTY: &[&str] = &[
"https://uor.foundation/conformance/lease_linearSite_constraint",
"https://uor.foundation/conformance/lease_leaseScope_constraint",
];
pub const SURFACE_FORM: &str = "lease-decl";
pub const TARGET_CLASS: &str = "https://uor.foundation/state/ContextLease";
}
pub mod lease_linear_site_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/state/linearSite";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#nonNegativeInteger";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "linear_site";
pub const SURFACE_PRODUCTION: &str = "integer-literal";
}
pub mod lease_lease_scope_constraint {
pub const CONSTRAINT_PROPERTY: &str = "https://uor.foundation/state/leaseScope";
pub const CONSTRAINT_RANGE: &str = "http://www.w3.org/2001/XMLSchema#string";
pub const MAX_COUNT: i64 = 1;
pub const MIN_COUNT: i64 = 1;
pub const SURFACE_KEYWORD: &str = "lease_scope";
pub const SURFACE_PRODUCTION: &str = "string-literal";
}
pub mod prelude_export_datum {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/schema/Datum";
}
pub mod prelude_export_term {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/schema/Term";
}
pub mod prelude_export_witt_level {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/schema/WittLevel";
}
pub mod prelude_export_compile_unit {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/reduction/CompileUnit";
}
pub mod prelude_export_compile_unit_builder {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/conformance/CompileUnitBuilder";
}
pub mod prelude_export_validated_wrapper {
pub const EXPORT_RUST_NAME: &str = "Validated";
pub const EXPORTS_CLASS: &str = "https://uor.foundation/conformance/ValidatedWrapper";
}
pub mod prelude_export_shape_violation_report {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/conformance/ShapeViolationReport";
}
pub mod prelude_export_validation_result {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/conformance/ValidationResult";
}
pub mod prelude_export_grounding_certificate {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/cert/GroundingCertificate";
}
pub mod prelude_export_lift_chain_certificate {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/cert/LiftChainCertificate";
}
pub mod prelude_export_inhabitance_certificate {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/cert/InhabitanceCertificate";
}
pub mod prelude_export_completeness_certificate {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/cert/CompletenessCertificate";
}
pub mod prelude_export_constrained_type {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/type/ConstrainedType";
}
pub mod prelude_export_complete_type {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/type/CompleteType";
}
pub mod prelude_export_grounded_context {
pub const EXPORTS_CLASS: &str = "https://uor.foundation/state/GroundedContext";
}
pub mod prelude_export_term_arena {
pub const EXPORT_RUST_NAME: &str = "TermArena";
pub const EXPORTS_CLASS: &str = "https://uor.foundation/conformance/WitnessDatum";
}