pub struct Device { /* private fields */ }
Expand description

Structure describing a logical device. Some members are internally mutable, stored behind mutexes.

Implementations§

source§

impl Device

source

pub fn backend(&self) -> Backend

Returns the backend this device is using.

source

pub fn is_valid(&self) -> bool

source

pub fn check_is_valid(&self) -> Result<(), DeviceError>

source

pub fn handle_hal_error(&self, error: DeviceError) -> DeviceError

source

pub fn get_queue(&self) -> Option<Arc<Queue>>

source

pub fn set_queue(&self, queue: &Arc<Queue>)

source

pub unsafe fn create_pipeline_cache( self: &Arc<Self>, desc: &PipelineCacheDescriptor<'_> ) -> Result<Arc<PipelineCache>, CreatePipelineCacheError>

Safety

The data field on desc must have previously been returned from crate::global::Global::pipeline_cache_get_data

source

pub fn get_hal_counters(&self) -> HalCounters

source

pub fn generate_allocator_report(&self) -> Option<AllocatorReport>

Trait Implementations§

source§

impl Debug for Device

source§

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

Formats the value using the given formatter. Read more
source§

impl Drop for Device

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl Labeled for Device

source§

fn label(&self) -> &str

Returns a string identifying this resource for logging and errors. Read more
source§

fn error_ident(&self) -> ResourceErrorIdent

source§

impl ResourceType for Device

source§

const TYPE: &'static str = "Device"

Auto Trait Implementations§

§

impl !RefUnwindSafe for Device

§

impl Send for Device

§

impl Sync for Device

§

impl Unpin for Device

§

impl !UnwindSafe for Device

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

impl<T> Upcast<T> for T

§

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

§

impl<T> WasmNotSend for T
where T: Send,

§

impl<T> WasmNotSendSync for T
where T: WasmNotSend + WasmNotSync,

§

impl<T> WasmNotSync for T
where T: Sync,