Struct camo_typescript::IntersectionType
source · pub struct IntersectionType {
pub left: Box<Type>,
pub right: Box<Type>,
}
Expand description
An intersection type.
Example:
type T = { name: string } & { value: number };
// ------------- ^ ----------------
See: https://www.typescriptlang.org/docs/handbook/2/objects.html#intersection-types
Fields§
§left: Box<Type>
The left-hand side of the intersection.
right: Box<Type>
The right-hand side of the intersection.
Trait Implementations§
source§impl Clone for IntersectionType
impl Clone for IntersectionType
source§fn clone(&self) -> IntersectionType
fn clone(&self) -> IntersectionType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for IntersectionType
impl Debug for IntersectionType
source§impl Display for IntersectionType
impl Display for IntersectionType
source§impl From<IntersectionType> for Type
impl From<IntersectionType> for Type
source§fn from(value: IntersectionType) -> Self
fn from(value: IntersectionType) -> Self
Converts to this type from the input type.
source§impl PartialEq<IntersectionType> for IntersectionType
impl PartialEq<IntersectionType> for IntersectionType
source§fn eq(&self, other: &IntersectionType) -> bool
fn eq(&self, other: &IntersectionType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for IntersectionType
Auto Trait Implementations§
impl RefUnwindSafe for IntersectionType
impl Send for IntersectionType
impl Sync for IntersectionType
impl Unpin for IntersectionType
impl UnwindSafe for IntersectionType
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