Enum typescript_type_def::type_expr::TypeExpr
source · [−]pub enum TypeExpr {
Ref(&'static TypeInfo),
Name(TypeName),
String(TypeString),
Tuple(TypeTuple),
Object(TypeObject),
Array(TypeArray),
Union(TypeUnion),
Intersection(TypeIntersection),
}
Expand description
A TypeScript type expression.
This type is not intended to cover all possible TypeScript type syntax,
only that which is needed by the types defined in this crate and as produced
by #[derive(TypeDef)]
.
Variants
Ref(&'static TypeInfo)
A reference to another type.
Name(TypeName)
A reference to a bare type name which should already be defined.
String(TypeString)
A type-level string literal.
Tuple(TypeTuple)
A tuple type.
Object(TypeObject)
An object type.
Array(TypeArray)
An array type.
Union(TypeUnion)
A union type.
Intersection(TypeIntersection)
An intersection type.
Implementations
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TypeExpr
impl Send for TypeExpr
impl Sync for TypeExpr
impl Unpin for TypeExpr
impl UnwindSafe for TypeExpr
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more