Skip to main content

NodeData

Trait NodeData 

Source
pub trait NodeData: Clone {
    type O;
    type I: Hash + Eq + Clone + Debug + PartialOrd + Ord;

    // Required methods
    fn compare(&self, old: &Self, created: &HashSet<Self::I>) -> Comparison;
    fn create_coalesce(&mut self, other: Self) -> Option<Self>;
    fn create(&self, ctx: &mut Self::O);
    fn delete_coalesce(&mut self, other: Self) -> Option<Self>;
    fn delete(&self, ctx: &mut Self::O);
    fn update(&self, ctx: &mut Self::O, old: &Self);
    fn renamed_from(&self) -> Option<Self::I>;
}

Required Associated Types§

Required Methods§

Source

fn compare(&self, old: &Self, created: &HashSet<Self::I>) -> Comparison

Source

fn create_coalesce(&mut self, other: Self) -> Option<Self>

Source

fn create(&self, ctx: &mut Self::O)

Source

fn delete_coalesce(&mut self, other: Self) -> Option<Self>

Source

fn delete(&self, ctx: &mut Self::O)

Source

fn update(&self, ctx: &mut Self::O, old: &Self)

Source

fn renamed_from(&self) -> Option<Self::I>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl NodeData for good_ormning::pg::graph::Node

Source§

impl NodeData for good_ormning::sqlite::graph::Node