Skip to main content

InstanceObject

Struct InstanceObject 

Source
pub struct InstanceObject { /* private fields */ }
Expand description

Opaque handle to a instance object

Implementations§

Source§

impl InstanceObject

Source

pub fn new(info: &InstanceCreateInfo<'_>) -> Result<Self>

Create a new Vulkan instance

§Failures

On failure, this command returns

  • brvk::VK_ERROR_OUT_OF_HOST_MEMORY
  • brvk::VK_ERROR_OUT_OF_DEVICE_MEMORY
  • brvk::VK_ERROR_INITIALIZATION_FAILED
  • brvk::VK_ERROR_LAYER_NOT_PRESENT
  • brvk::VK_ERROR_EXTENSION_NOT_PRESENT
  • brvk::VK_ERROR_INCOMPATIBLE_DRIVER
Source

pub const unsafe fn manage(handle: VkInstance) -> Self

Constructs from raw handle

§Safety

the handle must be valid and not freed

Source

pub const fn unmanage(self) -> VkInstance

Purges internal values (Drop will not be called for this resource)

Trait Implementations§

Source§

impl Drop for InstanceObject

Available on crate feature Implements only.
Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl Instance for InstanceObject

Source§

fn extra_procedure(&self, name: &CStr) -> Option<PFN_vkVoidFunction>

👎Deprecated:

do not use this directly(this does not provide caching!)

Return a function pointer for a command
Source§

fn physical_device_count(&self) -> Result<u32>

Counts the physical devices accessible to a Vulkan instance Read more
Source§

fn enumerate_physical_devices( &self, sink: &mut [MaybeUninit<VkPhysicalDevice>], ) -> Result<ArrayQueryResult<u32>>

Enumerates the physical devices accessible to a Vulkan instance Read more
Source§

fn iter_physical_devices<'a>(&'a self) -> Result<IterPhysicalDevices<'a, Self>>

Lazyly enumerates the physical devices accessible to a Vulkan instance Read more
Source§

fn enumerate_physical_devices_alloc( &self, ) -> Result<Vec<PhysicalDeviceObject<&Self>>>

Enumerates the physical devices accessible to a Vulkan instance Read more
Source§

impl InstanceGetPhysicalDeviceProperties2Extension for InstanceObject

Available on crate feature VK_KHR_get_physical_device_properties2 only.
Source§

impl VkHandle for InstanceObject

Source§

type Handle = VkInstance

Source§

fn native_ptr(&self) -> Self::Handle

Retrieve an underlying handle
Source§

fn as_transparent_ref<'a>(&'a self) -> VkHandleRef<'a, Self::Handle>

Source§

impl VkHandleMut for InstanceObject

Source§

fn native_ptr_mut(&mut self) -> Self::Handle

Retrieve an underlying mutable handle
Source§

fn as_transparent_ref_mut<'a>(&'a mut self) -> VkHandleRefMut<'a, Self::Handle>

Source§

impl VkObject for InstanceObject

Source§

const TYPE: VkObjectType = brvk::VK_OBJECT_TYPE_INSTANCE

Source§

impl Send for InstanceObject

Source§

impl Sync for InstanceObject

Auto Trait Implementations§

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
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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>,

Source§

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>,

Source§

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.
Source§

impl<T> VkHandleExt for T
where T: VkHandle,

Source§

fn eq_handle(&self, other: &Self) -> bool
where Self::Handle: VkRawHandle,

Checks the equality between vulkan objects by their handle value.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more