pub struct TestLayer<T: TestLayerTag = Tag<0>> { /* private fields */ }Available on crate feature
_test only.Expand description
The mock for the Layer trait.
Different T will result in different types, default to Tag<0>. TestGlobal<T> contains
the static resources(e.g. Global<TestLayer<T>>) related to this mock layer.
Implementations§
Source§impl<T: TestLayerTag> TestLayer<T>
impl<T: TestLayerTag> TestLayer<T>
Sourcepub fn get_instance_info(
&self,
instance: Instance,
) -> Option<Arc<impl Deref<Target = <Self as Layer>::InstanceInfo>>>
pub fn get_instance_info( &self, instance: Instance, ) -> Option<Arc<impl Deref<Target = <Self as Layer>::InstanceInfo>>>
Get the InstanceInfo mock from a VkInstance.
Sourcepub fn get_device_info(
&self,
device: Device,
) -> Option<Arc<impl Deref<Target = <Self as Layer>::DeviceInfo>>>
pub fn get_device_info( &self, device: Device, ) -> Option<Arc<impl Deref<Target = <Self as Layer>::DeviceInfo>>>
Get the DeviceInfo mock from a VkDevice.
Trait Implementations§
Source§impl<T: TestLayerTag> Default for TestLayer<T>
impl<T: TestLayerTag> Default for TestLayer<T>
Source§impl<T: TestLayerTag> Layer for TestLayer<T>
impl<T: TestLayerTag> Layer for TestLayer<T>
Source§type GlobalHooksInfo = MockGlobalHooksInfo<MockTestLayer<T>>
type GlobalHooksInfo = MockGlobalHooksInfo<MockTestLayer<T>>
The type that provides information about interception of
global commands. Read more
Source§type InstanceInfo = MockInstanceInfo<MockTestLayer<T>>
type InstanceInfo = MockInstanceInfo<MockTestLayer<T>>
The type that provides information about interception of
Vulkan instance functions,
global commands
not included. Read more
Source§type DeviceInfo = MockDeviceInfo<MockTestLayer<T>>
type DeviceInfo = MockDeviceInfo<MockTestLayer<T>>
The type that provides information about interception of
Vulkan device functions. Read more
Source§type InstanceInfoContainer = ArcDel<<TestLayer<T> as Layer>::InstanceInfo>
type InstanceInfoContainer = ArcDel<<TestLayer<T> as Layer>::InstanceInfo>
Source§type DeviceInfoContainer = ArcDel<<TestLayer<T> as Layer>::DeviceInfo>
type DeviceInfoContainer = ArcDel<<TestLayer<T> as Layer>::DeviceInfo>
Source§fn global_instance() -> impl Deref<Target = Global<Self>> + 'static
fn global_instance() -> impl Deref<Target = Global<Self>> + 'static
Source§fn manifest() -> LayerManifest
fn manifest() -> LayerManifest
Returns the
layer manifest
to the layer framework. Read more
Source§fn global_hooks_info(&self) -> &Self::GlobalHooksInfo
fn global_hooks_info(&self) -> &Self::GlobalHooksInfo
Returns a reference of the underlying
GlobalHooksInfo object.Source§fn create_device_info(
&self,
_physical_device: PhysicalDevice,
_create_info: &DeviceCreateInfo,
_allocator: Option<&AllocationCallbacks>,
device: Arc<Device>,
_next_get_device_proc_addr: PFN_vkGetDeviceProcAddr,
) -> ArcDel<Self::DeviceInfo>
fn create_device_info( &self, _physical_device: PhysicalDevice, _create_info: &DeviceCreateInfo, _allocator: Option<&AllocationCallbacks>, device: Arc<Device>, _next_get_device_proc_addr: PFN_vkGetDeviceProcAddr, ) -> ArcDel<Self::DeviceInfo>
The factory method for the
DeviceInfo type. Read moreSource§fn create_instance_info(
&self,
_create_info: &InstanceCreateInfo,
_allocator: Option<&AllocationCallbacks>,
instance: Arc<Instance>,
_next_get_instance_proc_addr: PFN_vkGetInstanceProcAddr,
) -> ArcDel<Self::InstanceInfo>
fn create_instance_info( &self, _create_info: &InstanceCreateInfo, _allocator: Option<&AllocationCallbacks>, instance: Arc<Instance>, _next_get_instance_proc_addr: PFN_vkGetInstanceProcAddr, ) -> ArcDel<Self::InstanceInfo>
The factory method for the
InstanceInfo type. Read moreSource§fn global_hooks(
&self,
) -> <Self::GlobalHooksInfo as GlobalHooksInfo>::HooksRefType<'_>
fn global_hooks( &self, ) -> <Self::GlobalHooksInfo as GlobalHooksInfo>::HooksRefType<'_>
Returns a reference of the underlying
GlobalHooks object. Read moreSource§fn hooked_instance_commands(
&self,
_instance_info: &Self::InstanceInfo,
) -> Box<dyn Iterator<Item = VulkanCommand>>
fn hooked_instance_commands( &self, _instance_info: &Self::InstanceInfo, ) -> Box<dyn Iterator<Item = VulkanCommand>>
Returns an iterator of
Vulkan instance functions
(global commands
not included) that the layer implementation needs to intercept. Read more
Source§fn hooked_device_commands(
&self,
_instance_info: &Self::InstanceInfo,
_device_info: Option<&Self::DeviceInfo>,
) -> Box<dyn Iterator<Item = VulkanCommand>>
fn hooked_device_commands( &self, _instance_info: &Self::InstanceInfo, _device_info: Option<&Self::DeviceInfo>, ) -> Box<dyn Iterator<Item = VulkanCommand>>
Returns an iterator of
Vulkan device functions
that the layer implementation needs to intercept. Read more
Auto Trait Implementations§
impl<T = Tag<0>> !Freeze for TestLayer<T>
impl<T> RefUnwindSafe for TestLayer<T>
impl<T> Send for TestLayer<T>
impl<T> Sync for TestLayer<T>
impl<T> Unpin for TestLayer<T>
impl<T> UnwindSafe for TestLayer<T>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
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