pub struct DefaultOwnership<'tcx, 'a> {
tcx: TyCtxt<'tcx>,
unique: Unique,
ref_adt_owner: &'a AdtOwner,
res: RawTypeOwner,
param: bool,
ptr: bool,
}
Fields§
§tcx: TyCtxt<'tcx>
§unique: Unique
§ref_adt_owner: &'a AdtOwner
§res: RawTypeOwner
§param: bool
§ptr: bool
Implementations§
source§impl<'tcx, 'a> DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> DefaultOwnership<'tcx, 'a>
pub fn new(tcx: TyCtxt<'tcx>, ref_adt_owner: &'a AdtOwner) -> Self
pub fn tcx(&self) -> TyCtxt<'tcx>
pub fn unique(&self) -> &Unique
pub fn unique_mut(&mut self) -> &mut Unique
pub fn get_res(&self) -> RawTypeOwner
pub fn set_res(&mut self, res: RawTypeOwner)
pub fn is_owning_true(&self) -> bool
pub fn get_param(&self) -> bool
pub fn set_param(&mut self, p: bool)
pub fn is_param_true(&self) -> bool
pub fn get_ptr(&self) -> bool
pub fn set_ptr(&mut self, p: bool)
pub fn is_ptr_true(&self) -> bool
pub fn owner(&self) -> &'a AdtOwner
Trait Implementations§
source§impl<'tcx, 'a> Clone for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> Clone for DefaultOwnership<'tcx, 'a>
source§fn clone(&self) -> DefaultOwnership<'tcx, 'a>
fn clone(&self) -> DefaultOwnership<'tcx, 'a>
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<'tcx, 'a> TypeVisitor<TyCtxt<'tcx>> for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> TypeVisitor<TyCtxt<'tcx>> for DefaultOwnership<'tcx, 'a>
type Result = ControlFlow<()>
fn visit_ty(&mut self, ty: Ty<'tcx>) -> Self::Result
fn visit_binder<T>(&mut self, t: &Binder<I, T>) -> Self::Resultwhere
T: TypeVisitable<I>,
fn visit_region(&mut self, r: <I as Interner>::Region) -> Self::Result
fn visit_const(&mut self, c: <I as Interner>::Const) -> Self::Result
fn visit_predicate(&mut self, p: <I as Interner>::Predicate) -> Self::Result
fn visit_clauses(&mut self, p: <I as Interner>::Clauses) -> Self::Result
fn visit_error( &mut self, _guar: <I as Interner>::ErrorGuaranteed, ) -> Self::Result
Auto Trait Implementations§
impl<'tcx, 'a> Freeze for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !RefUnwindSafe for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !Send for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !Sync for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> Unpin for DefaultOwnership<'tcx, 'a>
impl<'tcx, 'a> !UnwindSafe for DefaultOwnership<'tcx, 'a>
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
)