Struct spirv_cross2::reflect::ShaderResources
source · pub struct ShaderResources<'ctx>(/* private fields */);Expand description
A handle to shader resources.
Implementations§
source§impl<'ctx> ShaderResources<'ctx>
impl<'ctx> ShaderResources<'ctx>
sourcepub fn resources_for_type(
&self,
ty: ResourceType,
) -> Result<ResourceIter<'ctx>, SpirvCrossError>
pub fn resources_for_type( &self, ty: ResourceType, ) -> Result<ResourceIter<'ctx>, SpirvCrossError>
Get an iterator for all resources of the given type.
sourcepub fn builtin_resources_for_type(
&self,
ty: BuiltinResourceType,
) -> Result<BuiltinResourceIter<'ctx>, SpirvCrossError>
pub fn builtin_resources_for_type( &self, ty: BuiltinResourceType, ) -> Result<BuiltinResourceIter<'ctx>, SpirvCrossError>
Get an iterator for all builtin resources of the given type.
sourcepub fn all_resources(&self) -> Result<AllResources<'ctx>, SpirvCrossError>
pub fn all_resources(&self) -> Result<AllResources<'ctx>, SpirvCrossError>
Get all resources declared in the shader.
This will allocate a Vec for every resource type.
Auto Trait Implementations§
impl<'ctx> Freeze for ShaderResources<'ctx>
impl<'ctx> RefUnwindSafe for ShaderResources<'ctx>
impl<'ctx> !Send for ShaderResources<'ctx>
impl<'ctx> !Sync for ShaderResources<'ctx>
impl<'ctx> Unpin for ShaderResources<'ctx>
impl<'ctx> UnwindSafe for ShaderResources<'ctx>
Blanket Implementations§
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