rendy_chain

Trait Resource

Source
pub trait Resource: 'static {
    type Access: AccessFlags;
    type Usage: UsageFlags;
    type Layout: Copy + Debug + 'static;

    // Required methods
    fn no_usage() -> Self::Usage;
    fn layout_for(access: Self::Access) -> Self::Layout;
}
Expand description

Abstracts resource types that uses different usage flags and layouts types.

Required Associated Types§

Source

type Access: AccessFlags

Access flags for resource type.

Source

type Usage: UsageFlags

Usage flags type for the resource.

Source

type Layout: Copy + Debug + 'static

Layout type for the resource.

Required Methods§

Source

fn no_usage() -> Self::Usage

Empty usage.

Source

fn layout_for(access: Self::Access) -> Self::Layout

Layout suitable for specified accesses.

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.

Implementors§