pub struct WireSchemaBuilder { /* private fields */ }Expand description
Builds the flat WIT schema arena used alongside directly encoded values. Named definitions are reserved before their bodies are appended, allowing derived recursive types to refer to themselves without constructing a recursive schema model.
Implementations§
Source§impl WireSchemaBuilder
impl WireSchemaBuilder
pub fn push(&mut self, body: SchemaTypeBody) -> i32
pub fn push_with_metadata( &mut self, body: SchemaTypeBody, metadata: MetadataEnvelope, ) -> i32
pub fn reserve(&mut self, id: String, name: Option<String>) -> (i32, bool)
pub fn reserve_nominal( &mut self, id: String, name: Option<String>, claimant: &'static str, ) -> (i32, WireSchemaReservation)
pub fn begin_candidate(&mut self, definition: i32) -> WireSchemaBuilder
pub fn verify_candidate( &mut self, checkpoint: WireSchemaBuilder, definition: i32, candidate_body: i32, )
pub fn commit(&mut self, definition: i32, body: i32)
pub fn reference(&mut self, definition: i32) -> i32
pub fn node(&self, index: i32) -> Option<&SchemaTypeNode>
pub fn resolve(&self, index: i32) -> Option<&SchemaTypeNode>
pub fn finish(self, root: i32) -> SchemaGraph
Trait Implementations§
Source§impl Clone for WireSchemaBuilder
impl Clone for WireSchemaBuilder
Source§fn clone(&self) -> WireSchemaBuilder
fn clone(&self) -> WireSchemaBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for WireSchemaBuilder
impl Default for WireSchemaBuilder
Source§fn default() -> WireSchemaBuilder
fn default() -> WireSchemaBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WireSchemaBuilder
impl RefUnwindSafe for WireSchemaBuilder
impl Send for WireSchemaBuilder
impl Sync for WireSchemaBuilder
impl Unpin for WireSchemaBuilder
impl UnsafeUnpin for WireSchemaBuilder
impl UnwindSafe for WireSchemaBuilder
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