Struct gfx::handle::Manager

source ·
pub struct Manager<R>where
    R: Resources,{ /* private fields */ }
Expand description

Stores reference-counted resources used in a command buffer. Seals actual resource names behind the interface, automatically referencing them both by the Factory on resource creation and the Renderer during CommandBuffer population.

Implementations§

source§

impl<R> Manager<R>where R: Resources,

source

pub fn new() -> Manager<R>

Create a new handle manager

source

pub fn clear(&mut self)

Clear all references

source

pub fn extend(&mut self, other: &Manager<R>)

Extend with all references of another handle manager

source

pub fn count(&self) -> usize

Count the total number of referenced resources

source

pub fn ref_buffer<'a>( &mut self, handle: &'a RawBuffer<R> ) -> &'a <R as Resources>::Buffer

Reference a buffer

source

pub fn ref_shader<'a>( &mut self, handle: &'a Shader<R> ) -> &'a <R as Resources>::Shader

Reference a shader

source

pub fn ref_program<'a>( &mut self, handle: &'a Program<R> ) -> &'a <R as Resources>::Program

Reference a program

source

pub fn ref_pso<'a>( &mut self, handle: &'a RawPipelineState<R> ) -> (&'a <R as Resources>::PipelineStateObject, &'a <R as Resources>::Program)

Reference a pipeline state object

source

pub fn ref_texture<'a>( &mut self, handle: &'a RawTexture<R> ) -> &'a <R as Resources>::Texture

Reference a texture

source

pub fn ref_srv<'a>( &mut self, handle: &'a RawShaderResourceView<R> ) -> &'a <R as Resources>::ShaderResourceView

Reference a shader resource view

source

pub fn ref_uav<'a>( &mut self, handle: &'a RawUnorderedAccessView<R> ) -> &'a <R as Resources>::UnorderedAccessView

Reference an unordered access view

source

pub fn ref_rtv<'a>( &mut self, handle: &'a RawRenderTargetView<R> ) -> &'a <R as Resources>::RenderTargetView

Reference an RTV

source

pub fn ref_dsv<'a>( &mut self, handle: &'a RawDepthStencilView<R> ) -> &'a <R as Resources>::DepthStencilView

Reference a DSV

source

pub fn ref_sampler<'a>( &mut self, handle: &'a Sampler<R> ) -> &'a <R as Resources>::Sampler

Reference a sampler

source

pub fn ref_fence<'a>( &mut self, fence: &'a Fence<R> ) -> &'a <R as Resources>::Fence

Reference a fence

Trait Implementations§

source§

impl<R> Debug for Manager<R>where R: Debug + Resources, <R as Resources>::Shader: Debug, <R as Resources>::PipelineStateObject: Debug, <R as Resources>::ShaderResourceView: Debug, <R as Resources>::UnorderedAccessView: Debug, <R as Resources>::RenderTargetView: Debug, <R as Resources>::DepthStencilView: Debug, <R as Resources>::Sampler: Debug, <R as Resources>::Fence: Debug,

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<R> !RefUnwindSafe for Manager<R>

§

impl<R> Send for Manager<R>

§

impl<R> Sync for Manager<R>

§

impl<R> Unpin for Manager<R>

§

impl<R> !UnwindSafe for Manager<R>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.