[][src]Struct rendy_chain::Link

pub struct Link<R: Resource> { /* fields omitted */ }

This type defines what states resource are at some point in time when commands recorded into corresponding submissions are executed. Those commands doesn't required to perform actions with all access types declared by the link. But performing actions with access types not declared by the link is prohibited.

Methods

impl<R> Link<R> where
    R: Resource
[src]

pub fn new(node: LinkNode<R>) -> Self[src]

Create new link with first attached submission.

Parameters

access - Access flags performed in submission. usage - Usage flags required by submission.

pub fn family(&self) -> QueueFamilyId[src]

Get queue family that owns the resource at the link. All associated submissions must be from the same queue family.

pub fn submission_state(&self, sid: SubmissionId) -> State<R>[src]

Get usage.

pub fn state(&self) -> State<R>[src]

Get usage.

pub fn access(&self) -> R::Access[src]

Get access.

pub fn layout(&self) -> R::Layout[src]

Get layout.

pub fn usage(&self) -> R::Usage[src]

Get usage.

pub fn single_queue(&self) -> bool[src]

Check if the link is associated with only one queue.

pub fn compatible(&self, node: &LinkNode<R>) -> bool[src]

Check if the given state and submission are compatible with link. If compatible then the submission can be associated with the link.

pub fn add_node(&mut self, node: LinkNode<R>)[src]

Insert submission with specified state to the link. It must be compatible. Associating submission with the link will allow the submission to be executed in parallel with other submissions associated with this link. Unless other chains disallow.

Panics

This function will panic if state and sid are not compatible. E.g. Link::compatible didn't return true for the arguments.

pub fn queues(&self) -> impl Iterator<Item = (QueueId, &LinkQueueState<R>)>[src]

Iterate over queues.

pub fn queue(&self, qid: QueueId) -> &LinkQueueState<R>[src]

Get particular queue

Trait Implementations

impl<R: Clone + Resource> Clone for Link<R> where
    R::Access: Clone,
    R::Usage: Clone,
    R::Layout: Clone
[src]

impl<R: Debug + Resource> Debug for Link<R> where
    R::Access: Debug,
    R::Usage: Debug,
    R::Layout: Debug
[src]

Auto Trait Implementations

impl<R> Send for Link<R> where
    <R as Resource>::Access: Send,
    <R as Resource>::Layout: Send,
    <R as Resource>::Usage: Send

impl<R> Sync for Link<R> where
    <R as Resource>::Access: Sync,
    <R as Resource>::Layout: Sync,
    <R as Resource>::Usage: Sync

impl<R> Unpin for Link<R> where
    <R as Resource>::Access: Unpin,
    <R as Resource>::Layout: Unpin,
    <R as Resource>::Usage: Unpin

impl<R> UnwindSafe for Link<R> where
    <R as Resource>::Access: UnwindSafe,
    <R as Resource>::Layout: UnwindSafe,
    <R as Resource>::Usage: UnwindSafe

impl<R> RefUnwindSafe for Link<R> where
    <R as Resource>::Access: RefUnwindSafe,
    <R as Resource>::Layout: RefUnwindSafe,
    <R as Resource>::Usage: RefUnwindSafe

Blanket Implementations

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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

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

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