pub struct RenderGraphBufferConstraint {
pub size: Option<u64>,
pub resource_type: RafxResourceType,
}Expand description
Constraints on a buffer. Constraints are set per-field and start out None (i.e. unconstrained) The rendergraph will derive specifications from the constraints
Fields§
§size: Option<u64>§resource_type: RafxResourceTypeImplementations§
Source§impl RenderGraphBufferConstraint
impl RenderGraphBufferConstraint
pub fn try_convert_to_specification( self, ) -> Option<RenderGraphBufferSpecification>
Source§impl RenderGraphBufferConstraint
impl RenderGraphBufferConstraint
Sourcepub fn can_merge(&self, other: &RenderGraphBufferConstraint) -> bool
pub fn can_merge(&self, other: &RenderGraphBufferConstraint) -> bool
Returns true if no fields in the two constraints are conflicting
Sourcepub fn try_merge(&mut self, other: &RenderGraphBufferConstraint) -> bool
pub fn try_merge(&mut self, other: &RenderGraphBufferConstraint) -> bool
Merge other’s constraints into self, but only if there are no conflicts. No modification occurs if any conflict exists
Sourcepub fn partial_merge(&mut self, other: &RenderGraphBufferConstraint) -> bool
pub fn partial_merge(&mut self, other: &RenderGraphBufferConstraint) -> bool
Merge other’s constraints into self. We will merge fields where we can and skip fields with conflicts
Sourcepub fn set(&mut self, other: &RenderGraphBufferSpecification)
pub fn set(&mut self, other: &RenderGraphBufferSpecification)
Sets the constraints based on the given specification
Trait Implementations§
Source§impl Clone for RenderGraphBufferConstraint
impl Clone for RenderGraphBufferConstraint
Source§fn clone(&self) -> RenderGraphBufferConstraint
fn clone(&self) -> RenderGraphBufferConstraint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RenderGraphBufferConstraint
impl Debug for RenderGraphBufferConstraint
Source§impl From<RenderGraphBufferSpecification> for RenderGraphBufferConstraint
impl From<RenderGraphBufferSpecification> for RenderGraphBufferConstraint
Source§fn from(specification: RenderGraphBufferSpecification) -> Self
fn from(specification: RenderGraphBufferSpecification) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RenderGraphBufferConstraint
impl RefUnwindSafe for RenderGraphBufferConstraint
impl Send for RenderGraphBufferConstraint
impl Sync for RenderGraphBufferConstraint
impl Unpin for RenderGraphBufferConstraint
impl UnwindSafe for RenderGraphBufferConstraint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.