Skip to main content

Crate fory_core

Crate fory_core 

Source
Expand description

Core runtime for Apache Fory’s Rust implementation.

Serializer statically handles one associated Serializer::Target. An ordinary local type serializes itself. A local external structural serializer or manual serializer can target a type owned by another crate without creating a wrapper value.

Fory exposes ordinary roots for self-serializing types and four explicit-serializer roots: Fory::serialize_with, Fory::serialize_to_with, Fory::deserialize_with, and Fory::deserialize_from_with. Fory-owned carrier serializers such as VecSerializer and HashMapSerializer recursively compose child serializers while preserving standard carrier wire formats.

Application traits extend ForyObject and use register_trait_type! with a closed list of concrete target types. Concrete targets are dispatched through their registered serializer; serializer declarations and Rust trait names never appear on the wire.

Re-exports§

pub use crate::buffer::Reader;
pub use crate::buffer::Writer;
pub use crate::config::Config;
pub use crate::context::ReadContext;
pub use crate::context::WriteContext;
pub use crate::error::Error;
pub use crate::fory::Fory;
pub use crate::fory::ForyBuilder;
pub use crate::meta::compute_field_hash;
pub use crate::meta::compute_struct_hash;
pub use crate::resolver::RefFlag;
pub use crate::resolver::RefMode;
pub use crate::resolver::TypeInfo;
pub use crate::resolver::TypeResolver;
pub use crate::serializer::trait_object::ForyObject;
pub use crate::type_id::TypeId;
pub use crate::types::bfloat16::bfloat16 as BFloat16;
pub use crate::types::float16::float16 as Float16;
pub use crate::types::ArcWeak;
pub use crate::types::Date;
pub use crate::types::Decimal;
pub use crate::types::Duration;
pub use crate::types::RcWeak;
pub use crate::types::Timestamp;
pub use crate::types::UnknownCase;
pub use paste;

Modules§

buffer
config
context
error
PERFORMANCE CRITICAL MODULE
fory
meta
resolver
row
serializer
type_id
types
util

Macros§

bail
Returns early with an Error.
ensure
Ensures a condition is true; otherwise returns an Error.
not_allowed
Returns early with a Error::NotAllowed.
register_trait_type
Generates serializers for a closed set of concrete application-trait targets.