HashConsSerializerState

Trait HashConsSerializerState 

Source
pub trait HashConsSerializerState: Sized {
    // Required methods
    fn record_serialized<T: Mappable>(&self, id: HashConsId) -> Option<bool>;
    fn record_deserialized<T: Mappable>(
        &self,
        id: HashConsId,
        value: HashConsed<T>,
    );
    fn get_deserialized_val<T: Mappable>(
        &self,
        id: HashConsId,
    ) -> Option<HashConsed<T>>;
}

Required Methods§

Source

fn record_serialized<T: Mappable>(&self, id: HashConsId) -> Option<bool>

Record that this type is being serialized. Return None if we’re not deduplicating values, otherwise return whether this item was newly recorded.

Source

fn record_deserialized<T: Mappable>(&self, id: HashConsId, value: HashConsed<T>)

Record that we deserialized this type.

Source

fn get_deserialized_val<T: Mappable>( &self, id: HashConsId, ) -> Option<HashConsed<T>>

Find the previously-deserialized type with that id.

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.

Implementations on Foreign Types§

Source§

impl HashConsSerializerState for ()

Implementors§