[][src]Struct bedrock::ShaderModule

pub struct ShaderModule(_, _);

Opaque handle to a shader module object

Methods

impl ShaderModule[src]

Following methods are enabled with [feature = "Implements"]

pub fn from_memory<Buffer: AsRef<[u8]> + ?Sized>(
    device: &Device,
    buffer: &Buffer
) -> Result<Self>
[src]

Creates a new shader module object from bytes on the memory

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

pub fn from_file<FilePath: AsRef<Path> + ?Sized>(
    device: &Device,
    path: &FilePath
) -> Result<Self, Box<dyn Error>>
[src]

Creates a new shader module object from a file

Failures

On failure, this command returns

  • VK_ERROR_OUT_OF_HOST_MEMORY
  • VK_ERROR_OUT_OF_DEVICE_MEMORY

IO Errors may be occured when reading file

Trait Implementations

impl DeviceChild for ShaderModule[src]

impl Drop for ShaderModule[src]

impl VkHandle for ShaderModule[src]

type Handle = VkShaderModule

Auto Trait Implementations

impl !RefUnwindSafe for ShaderModule

impl !Send for ShaderModule

impl !Sync for ShaderModule

impl Unpin for ShaderModule

impl !UnwindSafe for ShaderModule

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.