Skip to main content

Crate sails_type_registry

Crate sails_type_registry 

Source
Expand description

Portable type metadata and registry for Sails.

This crate defines the metadata model used by Sails to describe Rust types in a portable form. Types implement TypeInfo, and a Registry collects their descriptions into a deduplicated table that can be consumed by IDL generation and related tooling.

Most users interact with this crate through #[derive(TypeInfo)]. Manual construction is available through the builder types re-exported here.

Re-exports§

pub extern crate alloc;

Re-exports§

pub use crate::builder::CompositeBuilder;
pub use crate::builder::FieldBuilder;
pub use crate::builder::ParamBuilder;
pub use crate::builder::TypeBuilder;
pub use crate::builder::VariantBuilder;
pub use crate::builder::VariantDefBuilder;
pub use core;
pub use sails_idl_ast as ast;

Modules§

builder
Builders for constructing ast::Type metadata manually.

Structs§

MetaType
Type-erased handle to a concrete TypeInfo implementation.
Registry
Named-type interner plus concrete-use-site cache.
TypeRef
Stable reference to a named type stored in a Registry.

Traits§

TypeInfo
Trait for exposing a Rust type as IDL metadata.

Functions§

const_suffixed_name
Builds a derive-owned name with const generic values encoded in a stable order.

Derive Macros§

TypeInfo
Derive macro for generating TypeInfo implementations.