mod instance;
mod interface;
mod memory;
mod speculation;
use core::fmt;
pub use self::{instance::EffectInstance, interface::*, memory::*, speculation::*};
use crate::{DynPartialEq, any::AsAny, eq::PartialEqable};
pub trait Effect: AsAny + fmt::Debug {}
pub trait Resource: AsAny + PartialEqable + DynPartialEq + fmt::Debug {
fn name(&self) -> &'static str;
}
#[derive(Debug, Default, PartialEq, Eq)]
pub struct DefaultResource;
impl Resource for DefaultResource {
fn name(&self) -> &'static str {
"default"
}
}
#[derive(Debug, Default, PartialEq, Eq)]
pub struct AutomaticAllocationScopeResource;
impl Resource for AutomaticAllocationScopeResource {
fn name(&self) -> &'static str {
"automatic-allocation-scope"
}
}
pub trait Pure: AlwaysSpeculatable + MemoryEffectOpInterface {}