pub trait UniformBlock {
// Required methods
fn matches(
_: &BlockLayout,
base_offset: usize,
) -> Result<(), LayoutMismatchError>;
fn build_layout(base_offset: usize) -> BlockLayout;
}
Expand description
Objects that are suitable for being inside a uniform block or a SSBO.
Required Methods§
Sourcefn matches(
_: &BlockLayout,
base_offset: usize,
) -> Result<(), LayoutMismatchError>
fn matches( _: &BlockLayout, base_offset: usize, ) -> Result<(), LayoutMismatchError>
Checks whether the uniforms’ layout matches the given block if Self
starts at
the given offset.
Sourcefn build_layout(base_offset: usize) -> BlockLayout
fn build_layout(base_offset: usize) -> BlockLayout
Builds the BlockLayout
corresponding to the current object.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.