Struct wdl_analysis::Types
source · pub struct Types(/* private fields */);Expand description
Represents a collection of types.
Implementations§
source§impl Types
impl Types
sourcepub fn add_array(&mut self, ty: ArrayType) -> Type
pub fn add_array(&mut self, ty: ArrayType) -> Type
Adds an array type to the type collection.
§Panics
Panics if the provided type contains a type definition identifier from a different types collection.
sourcepub fn add_pair(&mut self, ty: PairType) -> Type
pub fn add_pair(&mut self, ty: PairType) -> Type
Adds a pair type to the type collection.
§Panics
Panics if the provided type contains a type definition identifier from a different types collection.
sourcepub fn add_map(&mut self, ty: MapType) -> Type
pub fn add_map(&mut self, ty: MapType) -> Type
Adds a map type to the type collection.
§Panics
Panics if the provided type contains a type definition identifier from a different types collection.
sourcepub fn add_struct(&mut self, ty: StructType) -> Type
pub fn add_struct(&mut self, ty: StructType) -> Type
Adds a struct type to the type collection.
§Panics
Panics if the provided type contains a type definition identifier from a different types collection.
sourcepub fn type_definition(&self, id: CompoundTypeDefId) -> &CompoundTypeDef
pub fn type_definition(&self, id: CompoundTypeDefId) -> &CompoundTypeDef
Gets a compound type definition by identifier.
§Panics
Panics if the identifier is not for this type collection.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Types
impl RefUnwindSafe for Types
impl Send for Types
impl Sync for Types
impl Unpin for Types
impl UnwindSafe for Types
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more