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§
Sourcefn record_serialized<T: Mappable>(&self, id: HashConsId) -> Option<bool>
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.
Sourcefn record_deserialized<T: Mappable>(&self, id: HashConsId, value: HashConsed<T>)
fn record_deserialized<T: Mappable>(&self, id: HashConsId, value: HashConsed<T>)
Record that we deserialized this type.
Sourcefn get_deserialized_val<T: Mappable>(
&self,
id: HashConsId,
) -> Option<HashConsed<T>>
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".