rustc_type_ir::inherent

Trait GenericArgs

source
pub trait GenericArgs<I: Interner<GenericArgs = Self>>:
    Copy
    + Debug
    + Hash
    + Eq
    + SliceLike<Item = I::GenericArg>
    + Default
    + Relate<I> {
    // Required methods
    fn rebase_onto(
        self,
        interner: I,
        source_def_id: I::DefId,
        target: I::GenericArgs,
    ) -> I::GenericArgs;
    fn type_at(self, i: usize) -> I::Ty;
    fn region_at(self, i: usize) -> I::Region;
    fn const_at(self, i: usize) -> I::Const;
    fn identity_for_item(interner: I, def_id: I::DefId) -> I::GenericArgs;
    fn extend_with_error(
        interner: I,
        def_id: I::DefId,
        original_args: &[I::GenericArg],
    ) -> I::GenericArgs;
    fn split_closure_args(self) -> ClosureArgsParts<I>;
    fn split_coroutine_closure_args(self) -> CoroutineClosureArgsParts<I>;
    fn split_coroutine_args(self) -> CoroutineArgsParts<I>;

    // Provided methods
    fn as_closure(self) -> ClosureArgs<I> { ... }
    fn as_coroutine_closure(self) -> CoroutineClosureArgs<I> { ... }
    fn as_coroutine(self) -> CoroutineArgs<I> { ... }
}

Required Methods§

source

fn rebase_onto( self, interner: I, source_def_id: I::DefId, target: I::GenericArgs, ) -> I::GenericArgs

source

fn type_at(self, i: usize) -> I::Ty

source

fn region_at(self, i: usize) -> I::Region

source

fn const_at(self, i: usize) -> I::Const

source

fn identity_for_item(interner: I, def_id: I::DefId) -> I::GenericArgs

source

fn extend_with_error( interner: I, def_id: I::DefId, original_args: &[I::GenericArg], ) -> I::GenericArgs

source

fn split_closure_args(self) -> ClosureArgsParts<I>

source

fn split_coroutine_closure_args(self) -> CoroutineClosureArgsParts<I>

source

fn split_coroutine_args(self) -> CoroutineArgsParts<I>

Provided Methods§

Object Safety§

This trait is not object safe.

Implementors§