pub struct Ctor<'tcx> {
param_env: ParamEnv<'tcx>,
rustc_sig: PolyFnSig<'tcx>,
adt_def_id: DefId,
ctor_of: CtorOf,
variant_id: VariantIdx,
fields: IndexVec<FieldIdx, FieldDef<'tcx>>,
output_ty: Ty<'tcx>,
sig: PolyFnSig<'tcx>,
}Expand description
The constructor function of a tuple/unit struct or tuple/unit enum variant.
Fields§
§param_env: ParamEnv<'tcx>§rustc_sig: PolyFnSig<'tcx>The signature, instantiated with args.
adt_def_id: DefId§ctor_of: CtorOf§variant_id: VariantIdx§fields: IndexVec<FieldIdx, FieldDef<'tcx>>§output_ty: Ty<'tcx>§sig: PolyFnSig<'tcx>Implementations§
Source§impl<'tcx> Ctor<'tcx>
impl<'tcx> Ctor<'tcx>
pub fn param_env(&self) -> &ParamEnv<'tcx>
pub fn adt_def_id(&self) -> &DefId
pub fn ctor_of(&self) -> CtorOf
pub fn variant_id(&self) -> VariantIdx
pub fn fields(&self) -> &IndexVec<FieldIdx, FieldDef<'tcx>>
pub fn output_ty(&self) -> &Ty<'tcx>
pub fn sig(&self) -> &PolyFnSig<'tcx>
Trait Implementations§
Auto Trait Implementations§
impl<'tcx> !RefUnwindSafe for Ctor<'tcx>
impl<'tcx> !UnwindSafe for Ctor<'tcx>
impl<'tcx> DynSend for Ctor<'tcx>
impl<'tcx> DynSync for Ctor<'tcx>
impl<'tcx> Forget for Ctor<'tcx>
impl<'tcx> Freeze for Ctor<'tcx>
impl<'tcx> Move for Ctor<'tcx>
impl<'tcx> Send for Ctor<'tcx>
impl<'tcx> Sync for Ctor<'tcx>
impl<'tcx> Unpin for Ctor<'tcx>
impl<'tcx> UnsafeUnpin for Ctor<'tcx>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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