pub struct SchemaBuilder { /* private fields */ }Expand description
A file-level registry of struct schemas.
Built from a parsed syn::File, it maps every struct name to its fields
(name, syn::Type, doc-string). The registry is then used to resolve
syn::Type → PyroType with full knowledge of sibling structs.
Implementations§
Source§impl SchemaBuilder
impl SchemaBuilder
pub fn with_foreign_specs( self, dep_interfaces: &[InterfaceSpec<'static>], ) -> Self
pub fn struct_names(&self) -> Vec<String>
Sourcepub fn schema_for(&self, struct_name: &str) -> Option<PyroSchema<'static>>
pub fn schema_for(&self, struct_name: &str) -> Option<PyroSchema<'static>>
Build a PyroSchema for a struct that is in the registry.
Sourcepub fn resolve_type(&self, ty: &Type) -> PyroType<'static>
pub fn resolve_type(&self, ty: &Type) -> PyroType<'static>
Resolve a syn::Type to a PyroType, expanding known struct names
into full Group(fields).
Auto Trait Implementations§
impl !Send for SchemaBuilder
impl !Sync for SchemaBuilder
impl Freeze for SchemaBuilder
impl RefUnwindSafe for SchemaBuilder
impl Unpin for SchemaBuilder
impl UnsafeUnpin for SchemaBuilder
impl UnwindSafe for SchemaBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more