Struct flux_rustc_bridge::ty::Ty
source · pub struct Ty(Interned<TyS>);
Tuple Fields§
§0: Interned<TyS>
Implementations§
source§impl Ty
impl Ty
pub fn mk_adt(adt_def: AdtDef, args: impl Into<GenericArgs>) -> Ty
pub fn mk_closure(def_id: DefId, args: impl Into<GenericArgs>) -> Ty
pub fn mk_fn_def(def_id: DefId, args: impl Into<GenericArgs>) -> Ty
pub fn mk_coroutine(def_id: DefId, args: impl Into<GenericArgs>) -> Ty
pub fn mk_generator_witness(def_id: DefId, args: GenericArgs) -> Ty
pub fn mk_alias( kind: AliasKind, def_id: DefId, args: impl Into<GenericArgs>, ) -> Ty
pub fn mk_array(ty: Ty, c: Const) -> Ty
pub fn mk_slice(ty: Ty) -> Ty
pub fn mk_fn_ptr(fn_sig: PolyFnSig) -> Ty
pub fn mk_raw_ptr(ty: Ty, mutbl: Mutability) -> Ty
pub fn mk_bool() -> Ty
pub fn mk_float(float_ty: FloatTy) -> Ty
pub fn mk_int(int_ty: IntTy) -> Ty
pub fn mk_never() -> Ty
pub fn mk_param(param: ParamTy) -> Ty
pub fn mk_dynamic( exi_preds: impl Into<List<Binder<ExistentialPredicate>>>, r: Region, ) -> Ty
pub fn mk_ref(region: Region, ty: Ty, mutability: Mutability) -> Ty
pub fn mk_tuple(tys: impl Into<List<Ty>>) -> Ty
pub fn mk_uint(uint_ty: UintTy) -> Ty
pub fn mk_str() -> Ty
pub fn mk_char() -> Ty
pub fn deref(&self) -> Ty
pub fn kind(&self) -> &TyKind
pub fn tuple_fields(&self) -> &List<Ty>
pub fn expect_adt(&self) -> (&AdtDef, &GenericArgs)
pub fn is_mut_ref(&self) -> bool
pub fn is_box(&self) -> bool
Trait Implementations§
impl Eq for Ty
impl StructuralPartialEq for Ty
Auto Trait Implementations§
impl Freeze for Ty
impl RefUnwindSafe for Ty
impl Send for Ty
impl Sync for Ty
impl Unpin for Ty
impl UnwindSafe for Ty
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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