Struct rafx_framework::graph::RenderGraphImageConstraint
source · pub struct RenderGraphImageConstraint {
pub samples: Option<RafxSampleCount>,
pub format: Option<RafxFormat>,
pub resource_type: RafxResourceType,
pub extents: Option<RenderGraphImageExtents>,
pub layer_count: Option<u32>,
pub mip_count: Option<u32>,
}
Expand description
Constraints on an image. Constraints are set per-field and start out None (i.e. unconstrained) The rendergraph will derive specifications from the constraints
Fields§
§samples: Option<RafxSampleCount>
§format: Option<RafxFormat>
§resource_type: RafxResourceType
§extents: Option<RenderGraphImageExtents>
§layer_count: Option<u32>
§mip_count: Option<u32>
Implementations§
source§impl RenderGraphImageConstraint
impl RenderGraphImageConstraint
pub fn try_convert_to_specification( self, swapchain_surface_info: &SwapchainSurfaceInfo ) -> Option<RenderGraphImageSpecification>
source§impl RenderGraphImageConstraint
impl RenderGraphImageConstraint
sourcepub fn can_merge(&self, other: &RenderGraphImageConstraint) -> bool
pub fn can_merge(&self, other: &RenderGraphImageConstraint) -> bool
Returns true if no fields in the two constraints are conflicting
sourcepub fn try_merge(&mut self, other: &RenderGraphImageConstraint) -> bool
pub fn try_merge(&mut self, other: &RenderGraphImageConstraint) -> 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: &RenderGraphImageConstraint) -> bool
pub fn partial_merge(&mut self, other: &RenderGraphImageConstraint) -> 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: &RenderGraphImageSpecification)
pub fn set(&mut self, other: &RenderGraphImageSpecification)
Sets the constraints based on the given specification
Trait Implementations§
source§impl Clone for RenderGraphImageConstraint
impl Clone for RenderGraphImageConstraint
source§fn clone(&self) -> RenderGraphImageConstraint
fn clone(&self) -> RenderGraphImageConstraint
Returns a copy 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 RenderGraphImageConstraint
impl Debug for RenderGraphImageConstraint
source§impl Default for RenderGraphImageConstraint
impl Default for RenderGraphImageConstraint
source§fn default() -> RenderGraphImageConstraint
fn default() -> RenderGraphImageConstraint
Returns the “default value” for a type. Read more
source§impl From<RenderGraphImageSpecification> for RenderGraphImageConstraint
impl From<RenderGraphImageSpecification> for RenderGraphImageConstraint
source§fn from(specification: RenderGraphImageSpecification) -> Self
fn from(specification: RenderGraphImageSpecification) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for RenderGraphImageConstraint
impl Send for RenderGraphImageConstraint
impl Sync for RenderGraphImageConstraint
impl Unpin for RenderGraphImageConstraint
impl UnwindSafe for RenderGraphImageConstraint
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> 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.