Struct burn_wgpu::compute::WgpuResource
source · pub struct WgpuResource {
pub buffer: Arc<Buffer>,
pub kind: WgpuResourceKind,
}Expand description
The memory resource that can be allocated for wgpu.
Fields§
§buffer: Arc<Buffer>The wgpu buffer.
kind: WgpuResourceKindHow the resource is used.
Implementations§
source§impl WgpuResource
impl WgpuResource
sourcepub fn new(buffer: Arc<Buffer>, kind: WgpuResourceKind) -> Self
pub fn new(buffer: Arc<Buffer>, kind: WgpuResourceKind) -> Self
Constructs a new WgpuResource.
source§impl WgpuResource
impl WgpuResource
sourcepub fn as_binding(&self) -> BindingResource<'_>
pub fn as_binding(&self) -> BindingResource<'_>
Return the binding view of the buffer.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for WgpuResource
impl Send for WgpuResource
impl Sync for WgpuResource
impl Unpin for WgpuResource
impl !UnwindSafe for WgpuResource
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