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
Convert Usage<T> into T by value
Trait Implementations
Mutably borrows from an owned value. Read more
Creates a value from an iterator. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl<U, T> RefUnwindSafe for Usage<U, T> where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<U, T> UnwindSafe for Usage<U, T> where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more