pub struct Module {
pub schemas: Vec<Schema>,
pub roots: Vec<Root>,
}Expand description
A resolved set of types to generate from.
Fields§
§schemas: Vec<Schema>Every composite schema reachable from the roots, deduped and sorted by id (primitives are intrinsic and not listed). This is the registry a peer rebuilds from the emitted schema-bytes.
roots: Vec<Root>The root entry types, in the order they were added.
Implementations§
Source§impl Module
impl Module
Sourcepub fn from_shapes(roots: &[&'static Shape]) -> Result<Module, DeriveError>
pub fn from_shapes(roots: &[&'static Shape]) -> Result<Module, DeriveError>
Resolve a set of root shapes into one module. Schemas reachable from more than one root are deduped by their content-derived id.
§Errors
DeriveError if any shape uses a kind the bridge does not handle.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Module
impl RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl UnwindSafe for Module
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