Struct show_notes::e008::GenericContainer
source · pub struct GenericContainer<T, U> {
pub t: T,
pub u: U,
}
Expand description
This is just a container which can hold any two types.
These types can even be the same, but they don’t have to be. Moreover, they can be generic types themselves; as you can see in the tests below, you can use built-in or user-created generic types within this generic type.
Fields§
§t: T
§u: U
Auto Trait Implementations§
impl<T, U> Freeze for GenericContainer<T, U>
impl<T, U> RefUnwindSafe for GenericContainer<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for GenericContainer<T, U>
impl<T, U> Sync for GenericContainer<T, U>
impl<T, U> Unpin for GenericContainer<T, U>
impl<T, U> UnwindSafe for GenericContainer<T, U>where
T: UnwindSafe,
U: 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