pub struct ShapeContext { /* private fields */ }Expand description
Accumulates named definitions while a shape graph is built.
Implementations§
Source§impl ShapeContext
impl ShapeContext
Sourcepub fn define_named_type<F>(
&mut self,
type_name: TypeName,
build: F,
) -> ShapeRefwhere
F: FnOnce(&mut Self) -> DefinitionKind,
pub fn define_named_type<F>(
&mut self,
type_name: TypeName,
build: F,
) -> ShapeRefwhere
F: FnOnce(&mut Self) -> DefinitionKind,
Define a named type once and return a reference to its definition.
Trait Implementations§
Source§impl Debug for ShapeContext
impl Debug for ShapeContext
Source§impl Default for ShapeContext
impl Default for ShapeContext
Source§fn default() -> ShapeContext
fn default() -> ShapeContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ShapeContext
impl RefUnwindSafe for ShapeContext
impl Send for ShapeContext
impl Sync for ShapeContext
impl Unpin for ShapeContext
impl UnsafeUnpin for ShapeContext
impl UnwindSafe for ShapeContext
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