Struct wgpu_core::device::Device[][src]

pub struct Device<B: Backend> { /* fields omitted */ }

Structure describing a logical device. Some members are internally mutable, stored behind mutexes. TODO: establish clear order of locking for these: mem_allocator, desc_allocator, life_tracke, trackers, render_passes, pending_writes, trace.

Currently, the rules are:

  1. life_tracker is locked after hub.devices, enforced by the type system
  2. self.trackers is locked last (unenforced)
  3. self.trace is locked last (unenforced)

Implementations

impl<B: Backend> Device<B>[src]

pub fn borrow_pending_writes(&mut self) -> &mut B::CommandBuffer[src]

Trait Implementations

impl<B: Debug + Backend> Debug for Device<B> where
    B::Device: Debug
[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<B: Backend> Resource for Device<B>[src]

const TYPE: &'static str[src]

fn life_guard(&self) -> &LifeGuard[src]

fn label(&self) -> &str[src]

impl<B: Backend> Access<BindGroup<B>> for Device<B>[src]

impl<B: Backend> Access<BindGroupLayout<B>> for Device<B>[src]

impl<B: Backend> Access<Buffer<B>> for Device<B>[src]

impl<B: Backend> Access<CommandBuffer<B>> for Device<B>[src]

impl<B: Backend> Access<ComputePipeline<B>> for Device<B>[src]

impl<B: Backend> Access<Device<B>> for Root[src]

impl<B: Backend> Access<Device<B>> for Surface[src]

impl<B: Backend> Access<Device<B>> for Adapter<B>[src]

impl<B: Backend> Access<PipelineLayout<B>> for Device<B>[src]

impl<B: Backend> Access<QuerySet<B>> for Device<B>[src]

impl<B: Backend> Access<RenderBundle> for Device<B>[src]

impl<B: Backend> Access<RenderPipeline<B>> for Device<B>[src]

impl<B: Backend> Access<Sampler<B>> for Device<B>[src]

impl<B: Backend> Access<ShaderModule<B>> for Device<B>[src]

impl<B: Backend> Access<SwapChain<B>> for Device<B>[src]

impl<B: Backend> Access<Texture<B>> for Device<B>[src]

impl<B: Backend> Access<TextureView<B>> for Device<B>[src]

Auto Trait Implementations

impl<B> !RefUnwindSafe for Device<B>

impl<B> Send for Device<B>

impl<B> Sync for Device<B>

impl<B> Unpin for Device<B> where
    <B as Backend>::Buffer: Unpin,
    <B as Backend>::CommandBuffer: Unpin,
    <B as Backend>::CommandPool: Unpin,
    <B as Backend>::ComputePipeline: Unpin,
    <B as Backend>::DescriptorPool: Unpin,
    <B as Backend>::DescriptorSet: Unpin,
    <B as Backend>::DescriptorSetLayout: Unpin,
    <B as Backend>::Device: Unpin,
    <B as Backend>::Fence: Unpin,
    <B as Backend>::Framebuffer: Unpin,
    <B as Backend>::GraphicsPipeline: Unpin,
    <B as Backend>::Image: Unpin,
    <B as Backend>::ImageView: Unpin,
    <B as Backend>::Memory: Unpin,
    <B as Backend>::PipelineLayout: Unpin,
    <B as Backend>::QueryPool: Unpin,
    <B as Backend>::Queue: Unpin,
    <B as Backend>::RenderPass: Unpin,
    <B as Backend>::Sampler: Unpin

impl<B> !UnwindSafe for Device<B>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> Downcast<T> for T

pub fn downcast(&self) -> &T

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<T> Upcast<T> for T

pub fn upcast(&self) -> Option<&T>