pub struct TypeScriptAccumulator { /* private fields */ }
Expand description
Accumulates TypeScript definitions needed to define a type.
You probably do not need to use interact with this type unless you are implementing MagicInstantiate
manually.
A type might have fields that are other types that need their own definitions. This struct accumulates those definitions.
The add
method is used to add a type to the accumulator.
Implementations§
Source§impl TypeScriptAccumulator
impl TypeScriptAccumulator
Sourcepub fn add<T: MagicInstantiate>(&mut self)
pub fn add<T: MagicInstantiate>(&mut self)
Add a type to the accumulator.
This is a no-op if the type has already been added.
The accumulator will internally call add_dependencies
to add any
dependencies of the type.
Trait Implementations§
Source§impl Debug for TypeScriptAccumulator
impl Debug for TypeScriptAccumulator
Source§impl Default for TypeScriptAccumulator
impl Default for TypeScriptAccumulator
Source§fn default() -> TypeScriptAccumulator
fn default() -> TypeScriptAccumulator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TypeScriptAccumulator
impl RefUnwindSafe for TypeScriptAccumulator
impl Send for TypeScriptAccumulator
impl Sync for TypeScriptAccumulator
impl Unpin for TypeScriptAccumulator
impl UnwindSafe for TypeScriptAccumulator
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