Skip to main content

ReprStateStored

Trait ReprStateStored 

Source
pub trait ReprStateStored:
    Any
    + Send
    + Sync
    + Debug {
    // Required methods
    fn rule(&self) -> &'static dyn ReprRuleStored;
    fn up_via(
        &self,
        lu: &Box<dyn Fn(&DeclarationPtr) -> Option<Literal> + '_>,
    ) -> Result<Literal, ReprUpError>;
    fn repr_vars(&self) -> VecDeque<DeclarationPtr>;
    fn as_any(&self) -> &(dyn Any + 'static);
    fn as_any_mut(&mut self) -> &mut (dyn Any + 'static);
    fn clone_box(&self) -> Box<dyn ReprStateStored>;
    fn serialise(&self) -> Result<Value, Error>;

    // Provided method
    fn up(
        &self,
        raw_assignment: &HashMap<Name, Literal>,
    ) -> Result<Literal, ReprUpError> { ... }
}

Required Methods§

Source

fn rule(&self) -> &'static dyn ReprRuleStored

Source

fn up_via( &self, lu: &Box<dyn Fn(&DeclarationPtr) -> Option<Literal> + '_>, ) -> Result<Literal, ReprUpError>

Source

fn repr_vars(&self) -> VecDeque<DeclarationPtr>

Source

fn as_any(&self) -> &(dyn Any + 'static)

Source

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source

fn clone_box(&self) -> Box<dyn ReprStateStored>

Source

fn serialise(&self) -> Result<Value, Error>

Provided Methods§

Source

fn up( &self, raw_assignment: &HashMap<Name, Literal>, ) -> Result<Literal, ReprUpError>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<D> ReprStateStored for D
where D: ReprDeclLevel,