pub struct FnMutDelegate<'db, 'a> {
pub regions: &'a mut (dyn FnMut(BoundRegion) -> Region<'db> + 'a),
pub types: &'a mut (dyn FnMut(BoundTy) -> Ty<'db> + 'a),
pub consts: &'a mut (dyn FnMut(BoundVar) -> Const<'db> + 'a),
}
Expand description
A simple delegate taking 3 mutable functions. The used functions must always return the same result for each bound variable, no matter how frequently they are called.
Fields§
§regions: &'a mut (dyn FnMut(BoundRegion) -> Region<'db> + 'a)
§types: &'a mut (dyn FnMut(BoundTy) -> Ty<'db> + 'a)
§consts: &'a mut (dyn FnMut(BoundVar) -> Const<'db> + 'a)
Trait Implementations§
Source§impl<'db, 'a> BoundVarReplacerDelegate<'db> for FnMutDelegate<'db, 'a>
impl<'db, 'a> BoundVarReplacerDelegate<'db> for FnMutDelegate<'db, 'a>
fn replace_region(&mut self, br: BoundRegion) -> Region<'db>
fn replace_ty(&mut self, bt: BoundTy) -> Ty<'db>
fn replace_const(&mut self, bv: BoundVar) -> Const<'db>
Auto Trait Implementations§
impl<'db, 'a> Freeze for FnMutDelegate<'db, 'a>
impl<'db, 'a> !RefUnwindSafe for FnMutDelegate<'db, 'a>
impl<'db, 'a> !Send for FnMutDelegate<'db, 'a>
impl<'db, 'a> !Sync for FnMutDelegate<'db, 'a>
impl<'db, 'a> Unpin for FnMutDelegate<'db, 'a>
impl<'db, 'a> !UnwindSafe for FnMutDelegate<'db, '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
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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