Struct vulkano::shader::ShaderInterface
source · [−]pub struct ShaderInterface { /* private fields */ }
Expand description
Type that contains the definition of an interface between two shader stages, or between the outside and a shader stage.
Implementations
sourceimpl ShaderInterface
impl ShaderInterface
sourcepub unsafe fn new_unchecked(
elements: Vec<ShaderInterfaceEntry>
) -> ShaderInterface
pub unsafe fn new_unchecked(
elements: Vec<ShaderInterfaceEntry>
) -> ShaderInterface
Constructs a new ShaderInterface
.
Safety
- Must only provide one entry per location.
- The format of each element must not be larger than 128 bits.
sourcepub const fn empty() -> ShaderInterface
pub const fn empty() -> ShaderInterface
Creates a description of an empty shader interface.
sourcepub fn elements(&self) -> &[ShaderInterfaceEntry]
pub fn elements(&self) -> &[ShaderInterfaceEntry]
Returns a slice containing the elements of the interface.
sourcepub fn matches(
&self,
other: &ShaderInterface
) -> Result<(), ShaderInterfaceMismatchError>
pub fn matches(
&self,
other: &ShaderInterface
) -> Result<(), ShaderInterfaceMismatchError>
Checks whether the interface is potentially compatible with another one.
Returns Ok
if the two interfaces are compatible.
Trait Implementations
sourceimpl Clone for ShaderInterface
impl Clone for ShaderInterface
sourcefn clone(&self) -> ShaderInterface
fn clone(&self) -> ShaderInterface
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations
impl RefUnwindSafe for ShaderInterface
impl Send for ShaderInterface
impl Sync for ShaderInterface
impl Unpin for ShaderInterface
impl UnwindSafe for ShaderInterface
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more