Skip to main content

ArchivedDBData

Trait ArchivedDBData 

Source
pub trait ArchivedDBData:
    for<'a> Serialize<DbspSerializer<'a>>
    + Archive<Archived = Self::Repr>
    + Sized {
    type Repr: Deserialize<Self, Deserializer> + Ord;
}
Expand description

Trait for DBData that can be deserialized with rkyv.

The associated type Repr with the bound + connecting it to Archived seems to be the key for rust to know the bounds exist globally in the code without having to specify the bounds everywhere.

Required Associated Types§

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<T> ArchivedDBData for T

We also automatically implement this bound for everything that satisfies it.