pub struct GetInto<Inner, I>(/* private fields */);Expand description
Converts Get<I> to Get<R> using Into.
Acts as a type-safe bridge between Get implementations where I: Into<R>.
Inner: TheGet<I>implementationI: Source type to convert from
§Example
use bounded_collections::Get;
use bounded_collections::GetInto;
struct MyGetter;
impl Get<u16> for MyGetter { fn get() -> u16 { 42 } }
let foo: u32 = GetInto::<MyGetter, u16>::get();
assert_eq!(foo, 42u32); // <--- infered as u32Trait Implementations§
Auto Trait Implementations§
impl<Inner, I> Freeze for GetInto<Inner, I>
impl<Inner, I> RefUnwindSafe for GetInto<Inner, I>where
Inner: RefUnwindSafe,
I: RefUnwindSafe,
impl<Inner, I> Send for GetInto<Inner, I>
impl<Inner, I> Sync for GetInto<Inner, I>
impl<Inner, I> Unpin for GetInto<Inner, I>
impl<Inner, I> UnwindSafe for GetInto<Inner, I>where
Inner: UnwindSafe,
I: 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