pub struct Interface {
pub export: bool,
pub name: String,
pub parameters: Vec<&'static str>,
pub fields: Vec<Field>,
}
Expand description
A top-level interface
definition.
Example:
interface Foo {
value: number;
}
See: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#interfaces
Fields§
§export: bool
Whether the interface is marked with export
.
name: String
The name of the interface.
parameters: Vec<&'static str>
The generic parameters of the interface.
fields: Vec<Field>
The fields of the interface.
Trait Implementations§
Source§impl From<Interface> for Definition
impl From<Interface> for Definition
impl StructuralPartialEq for Interface
Auto Trait Implementations§
impl Freeze for Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
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