pub struct GpuRequest {
pub usage: GpuUsage,
pub format: Option<GpuFormat>,
pub size_bytes: u64,
}Expand description
Request shape for resource creation.
use daedalus_gpu::{GpuRequest, GpuUsage};
let req = GpuRequest { usage: GpuUsage::UPLOAD, format: None, size_bytes: 1024 };
assert_eq!(req.size_bytes, 1024);Fields§
§usage: GpuUsage§format: Option<GpuFormat>§size_bytes: u64Trait Implementations§
Source§impl Clone for GpuRequest
impl Clone for GpuRequest
Source§fn clone(&self) -> GpuRequest
fn clone(&self) -> GpuRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GpuRequest
impl Debug for GpuRequest
Source§impl<'de> Deserialize<'de> for GpuRequest
impl<'de> Deserialize<'de> for GpuRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for GpuRequest
impl PartialEq for GpuRequest
Source§impl Serialize for GpuRequest
impl Serialize for GpuRequest
impl Eq for GpuRequest
impl StructuralPartialEq for GpuRequest
Auto Trait Implementations§
impl Freeze for GpuRequest
impl RefUnwindSafe for GpuRequest
impl Send for GpuRequest
impl Sync for GpuRequest
impl Unpin for GpuRequest
impl UnwindSafe for GpuRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more