Expand description
Pagable serialization framework.
The main traits for types to implement are:
PagableSerialize- implemented by types that can be serializedPagableDeserialize- implemented by types that can be deserializedPagableDeserializeOwned- implemented by types that can be deserialized from any lifetimePagable- a convenience trait combining both PagableSerialize and PagableDeserialize withSend + Sync + Debug
Implementations can use the derive macros #[derive(Pagable)] (which will derive both serialize and deserialize), #[derive(PagableSerialize)],
and #[derive(PagableDeserialize)] for automatic implementations.
Re-exports§
pub use typetag::PagableRegisteredFor;pub use typetag::PagableTagged;pub use storage::data::DataKey;pub use storage::data::OptionalDataKey;pub use traits::Pagable;pub use traits::PagableBoxDeserialize;pub use traits::PagableCursor;pub use traits::PagableDeserialize;pub use traits::PagableDeserializeOwned;pub use traits::PagableDeserializer;pub use traits::PagableEagerDeserialize;pub use traits::PagableEagerSerialize;pub use traits::PagableSerialize;pub use traits::PagableSerializer;pub use traits::SessionContext;
Modules§
- __
internal - arc_
erase - Type erasure traits for Arc serialization.
- context
- flavors
- Custom postcard flavors for pagable serialization that expose position tracking and random access capabilities.
- static_
value - Pagable implementation for static values.
- storage
- testing
- Testing utilities for pagable serialization.
- traits
- Core traits for pagable serialization and deserialization.
- typetag
- Pagable-native trait object serialization using inventory for auto-registration.
Macros§
- anyhow
- Construct an ad-hoc error from a string or existing non-
anyhowerror value. - declare_
static_ value_ type - Declare a static value type for pagable serialization.
- register_
typetag - Register a concrete generic instantiation of a wrapper for pagable
typetag dispatch. Each call emits the
PagableRegisteredFor<dyn Trait>impl plus an inventory entry keyed bystd::any::type_name. SeePagableRegisteredForfor the full picture. - static_
bytes - Create and register a
StaticBytesconstant. - static_
str - Create and register a
StaticStrconstant. - static_
value - Create and register a static value constant.
- use_
serde
Structs§
- Pagable
Arc - A reference-counted smart pointer that supports paging data to/from storage.
- Pinned
Pagable Arc - A reference-counted smart pointer that guarantees data is in memory.
- Pinned
Pagable ArcBorrow - A borrowed reference to pinned data, avoiding reference count manipulation.
- Static
Value - A registered static value for pagable serialization/deserialization.
Type Aliases§
Attribute Macros§
- pagable_
tagged - Attribute macro for pagable trait object serialization.
- pagable_
typetag
Derive Macros§
- Pagable
- Pagable
Deserialize - Pagable
Panic - Derives
PagableSerializeandPagableDeserializeimplementations that panic when called. Useful for types that need to satisfy trait bounds but should never actually be serialized/deserialized. - Pagable
Serialize