Struct TaskNodeBuilder

Source
pub struct TaskNodeBuilder<'a> { /* private fields */ }
Expand description

A builder used to add resource accesses and attachments to a TaskNode.

Implementations§

Source§

impl TaskNodeBuilder<'_>

Source

pub fn buffer_access( &mut self, id: Id<Buffer>, access_types: AccessTypes, ) -> &mut Self

Adds a buffer access to the task node.

§Panics
  • Panics if id is not a valid virtual resource ID nor a valid physical ID.
  • Panics if access_types contains any access type that’s not a valid buffer access type.
Source

pub fn image_access( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, ) -> &mut Self

Adds an image access to the task node.

§Panics
  • Panics if id is not a valid virtual resource ID nor a valid physical ID.
  • Panics if access_types contains any access type that’s not a valid image access type.
  • Panics if access_types contains attachment access types as well as other access types.
  • Panics if access_types contains both color and depth/stencil access types.
  • Panics if an access for id was already added and its image layout doesn’t equal access_types.image_layout(layout_type).
Source

pub fn framebuffer(&mut self, id: Id<Framebuffer>) -> &mut Self

Sets the framebuffer that the task node’s attachments will belong to. You must call this method before adding attachments to the task node.

§Panics
  • Panics if id is not a valid framebuffer ID.
  • Panics if the framebuffer was already set.
Source

pub fn input_attachment( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, attachment_info: &AttachmentInfo<'_>, ) -> &mut Self

Adds an input attachment to the task node.

§Panics
  • Panics if the framebuffer wasn’t set beforehand.
  • Panics if id is not a valid virtual resource ID nor a valid physical ID.
  • Panics if access_types contains any access type that’s not an input attachment access type.
  • Panics if an input attachment for id was already added.
  • Panics if an input attachment using the attachment_info.index was already added.
  • Panics if a color or depth/stencil attachment using id was added but the attachment infos don’t match.
  • Panics if an access for id was already added and its image layout doesn’t equal access_types.image_layout(layout_type).
Source

pub fn color_attachment( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, attachment_info: &AttachmentInfo<'_>, ) -> &mut Self

Adds a color attachment to the task node.

§Panics
  • Panics if the framebuffer wasn’t set beforehand.
  • Panics if id is not a valid virtual resource ID nor a valid physical ID.
  • Panics if access_types contains any access type that’s not a color attachment access type.
  • Panics if a color attachment using id was already added.
  • Panics if a color attachment using the attachment_info.index was already added.
  • Panics if an input attachment using id was added but the attachment infos don’t match.
  • Panics if attachment_info.format is not a color format.
  • Panics if an access for id was already added and its image layout doesn’t equal access_types.image_layout(layout_type).
Source

pub fn depth_stencil_attachment( &mut self, id: Id<Image>, access_types: AccessTypes, layout_type: ImageLayoutType, attachment_info: &AttachmentInfo<'_>, ) -> &mut Self

Adds a depth/stencil attachment to the task node.

§Panics
  • Panics if the framebuffer wasn’t set beforehand.
  • Panics if id is not a valid virtual resource ID nor a valid physical ID.
  • Panics if access_types contains any access type that’s not a depth/stencil attachment access type.
  • Panics if a depth/stencil attachment was already added.
  • Panics if an input attachment using id was added but the attachment infos don’t match.
  • Panics if attachment_info.format is not a depth/stencil format.
  • Panics if an access for id was already added and its image layout doesn’t equal access_types.image_layout(layout_type).
Source

pub fn build(&mut self) -> NodeId

Finishes building the task node and returns the ID of the built node.

Auto Trait Implementations§

§

impl<'a> Freeze for TaskNodeBuilder<'a>

§

impl<'a> !RefUnwindSafe for TaskNodeBuilder<'a>

§

impl<'a> Send for TaskNodeBuilder<'a>

§

impl<'a> Sync for TaskNodeBuilder<'a>

§

impl<'a> Unpin for TaskNodeBuilder<'a>

§

impl<'a> !UnwindSafe for TaskNodeBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.