#![feature(int_roundings)]
#![cfg_attr(coverage_nightly, feature(no_coverage))]
use error::EffectError;
use rusvid_core::plane::Plane;
pub mod error;
mod functions;
pub mod library;
pub type ID = String;
pub trait Element {
fn id(&self) -> Option<&ID>;
fn name(&self) -> &str;
}
pub trait EffectLogic: std::fmt::Debug + Element {
fn apply(&self, original: Plane) -> Result<Plane, EffectError>;
fn depends_on_other_effects_ids(&self) -> Vec<ID> {
Vec::new()
}
fn depends_on_other_effects(&self) -> bool {
!self.depends_on_other_effects_ids().is_empty()
}
#[allow(unused_variables)]
fn add_depended_on_other_effect(&mut self, effect_id: &str) {}
}