pub struct QueryPool { /* private fields */ }
Expand description
A collection of one or more queries of a particular type.
Implementations§
source§impl QueryPool
impl QueryPool
sourcepub fn new(
device: Arc<Device>,
create_info: QueryPoolCreateInfo
) -> Result<Arc<QueryPool>, QueryPoolCreationError>
pub fn new(
device: Arc<Device>,
create_info: QueryPoolCreateInfo
) -> Result<Arc<QueryPool>, QueryPoolCreationError>
sourcepub unsafe fn from_handle(
device: Arc<Device>,
handle: QueryPool,
create_info: QueryPoolCreateInfo
) -> Arc<QueryPool>
pub unsafe fn from_handle(
device: Arc<Device>,
handle: QueryPool,
create_info: QueryPoolCreateInfo
) -> Arc<QueryPool>
Creates a new QueryPool
from a raw object handle.
Safety
handle
must be a valid Vulkan object handle created fromdevice
.create_info
must match the info used to create the object.
sourcepub fn query_type(&self) -> QueryType
pub fn query_type(&self) -> QueryType
Returns the query type of the pool.
sourcepub fn query_count(&self) -> u32
pub fn query_count(&self) -> u32
Returns the number of query slots of this query pool.
sourcepub fn query(&self, index: u32) -> Option<Query<'_>>
pub fn query(&self, index: u32) -> Option<Query<'_>>
Returns a reference to a single query slot, or None
if the index is out of range.
sourcepub fn queries_range(&self, range: Range<u32>) -> Option<QueriesRange<'_>>
pub fn queries_range(&self, range: Range<u32>) -> Option<QueriesRange<'_>>
Returns a reference to a range of queries, or None
if out of range.
Panics
- Panics if the range is empty.