Struct typescript_type_def::type_expr::TypeIntersection
source · [−]Expand description
A TypeScript intersection type.
Note that not all valid TypeScript intersection types are possible to represent using JSON. In general, only object types with disjoint fields can be intersected and still be accurately encoded as JSON (the resulting type being an object with the combined fields of all the intersection members).
Fields
docs: Option<Docs>
The documentation for this intersection.
members: List<TypeExpr>
The types that comprise this intersection.
If the members are empty, this type describes the vacuous intersection
type which is equivalent to any
. If the members contain only one
type, this type is equivalent to that type.
Trait Implementations
sourceimpl Clone for TypeIntersection
impl Clone for TypeIntersection
sourcefn clone(&self) -> TypeIntersection
fn clone(&self) -> TypeIntersection
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for TypeIntersection
impl Debug for TypeIntersection
impl Copy for TypeIntersection
Auto Trait Implementations
impl RefUnwindSafe for TypeIntersection
impl Send for TypeIntersection
impl Sync for TypeIntersection
impl Unpin for TypeIntersection
impl UnwindSafe for TypeIntersection
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub 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.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more