pub struct Usage<U, T> {
pub data: T,
/* private fields */
}Expand description
Wrapper type for creating a transparent-yet-distinct type over some underlying data.
use usage::Usage;
enum Window {};
enum Surface {};
enum Texture {};
type Size = (u32, u32);
type WindowSize = Usage<Window, Size>;
type SurfaceSize = Usage<Surface, Size>;
type TextureSize = Usage<Texture, Size>;Fields§
§data: TImplementations§
Source§impl<U, T> Usage<U, T>
impl<U, T> Usage<U, T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Convert Usage<T> into T by value
Trait Implementations§
Source§impl<U, T> BorrowMut<T> for Usage<U, T>
impl<U, T> BorrowMut<T> for Usage<U, T>
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<U, T, V> FromIterator<V> for Usage<U, T>where
T: FromIterator<V>,
impl<U, T, V> FromIterator<V> for Usage<U, T>where
T: FromIterator<V>,
Source§fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = V>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl<U, T> Ord for Usage<U, T>where
T: Ord,
impl<U, T> Ord for Usage<U, T>where
T: Ord,
Source§impl<U, T> PartialOrd for Usage<U, T>where
T: PartialOrd,
impl<U, T> PartialOrd for Usage<U, T>where
T: PartialOrd,
impl<U, T> Copy for Usage<U, T>where
T: Copy,
impl<U, T> Eq for Usage<U, T>where
T: Eq,
Auto Trait Implementations§
impl<U, T> Freeze for Usage<U, T>where
T: Freeze,
impl<U, T> RefUnwindSafe for Usage<U, T>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, T> Send for Usage<U, T>
impl<U, T> Sync for Usage<U, T>
impl<U, T> Unpin for Usage<U, T>
impl<U, T> UnwindSafe for Usage<U, T>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