Struct sierra::PhysicalDevice [−][src]
Opaque value representing a device (software emulated of hardware). Can be used to fetch information about device, its support of the surface and create graphics device.
Implementations
impl PhysicalDevice
[src]
pub fn info(&self) -> DeviceInfo
[src]
Returns information about this device.
pub fn surface_capabilities(
&self,
surface: &Surface
) -> Result<Option<SurfaceCapabilities>, SurfaceError>
[src]
&self,
surface: &Surface
) -> Result<Option<SurfaceCapabilities>, SurfaceError>
Returns surface capabilities.
Returns Ok(None)
if this device does not support surface.
pub fn create_device<Q>(
self,
features: &[Feature],
queues: Q
) -> Result<(Device, Q::Queues), CreateDeviceError<Q::Error>> where
Q: QueuesQuery,
[src]
self,
features: &[Feature],
queues: Q
) -> Result<(Device, Q::Queues), CreateDeviceError<Q::Error>> where
Q: QueuesQuery,
Create graphics API device.
features
- device will enable specifeid features.
Only features listed in DeviceInfo
returned from self.info()
can
be specified here. Otherwise device creation will fail.
queues
- specifies QueuesQuery
object which will query device and
initialize command queues.
Returns initialized device and queues.
Type in which queues are returned depends on type of queues query,
it may be single queue, an array of queues, struct, anything.
Note. QueuesQuery
may be implemented by user, this trait is not
sealed.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PhysicalDevice
impl Send for PhysicalDevice
impl Sync for PhysicalDevice
impl Unpin for PhysicalDevice
impl UnwindSafe for PhysicalDevice
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,