pub struct Lowered<'a, T: 'a> { /* private fields */ }
Expand description
A value of T
with its lifetime shortened to 'a
. This is isomorphic to
<T as Lower<'a>>::Target
, but provides additional information to the compiler to assist
type inferencing.
Implementations§
Source§impl<'a, T: 'a> Lowered<'a, T>
impl<'a, T: 'a> Lowered<'a, T>
Sourcepub fn new<'b, O>(value: O) -> Selfwhere
O: Lower<'b, Target = T> + 'a,
'b: 'a,
pub fn new<'b, O>(value: O) -> Selfwhere
O: Lower<'b, Target = T> + 'a,
'b: 'a,
Constructs a Lowered
from its wrapped value.
The type signature of this function may look a bit odd, but it was carefully crafted
to assist type inferencing and minimize spurious compiler errors. You can think of
this function as taking a <T as Lower<'a>>::Target
.
Sourcepub fn new_direct(value: <T as Lower<'a>>::Target) -> Self
pub fn new_direct(value: <T as Lower<'a>>::Target) -> Self
Constructs a Lowered
from its wrapped value.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Lowered<'a, T>where
T: Freeze,
impl<'a, T> RefUnwindSafe for Lowered<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Lowered<'a, T>where
T: Send,
impl<'a, T> Sync for Lowered<'a, T>where
T: Sync,
impl<'a, T> Unpin for Lowered<'a, T>where
T: Unpin,
impl<'a, T> UnwindSafe for Lowered<'a, T>where
T: UnwindSafe,
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