MCPcopy Create free account
hub / github.com/DioxusLabs/anyrender / eq

Method eq

crates/anyrender/src/types.rs:39–48  ·  view source on GitHub ↗
(&self, other: &Self)

Source from the content-addressed store, hash-verified

37
38impl<I: PartialEq, G: PartialEq> PartialEq for Paint<I, G, Arc<dyn Any + Send + Sync>> {
39 fn eq(&self, other: &Self) -> bool {
40 match (self, other) {
41 (Self::Solid(l0), Self::Solid(r0)) => l0 == r0,
42 (Self::Gradient(l0), Self::Gradient(r0)) => l0 == r0,
43 (Self::Image(l0), Self::Image(r0)) => l0 == r0,
44 (Self::Resource(l0), Self::Resource(r0)) => l0 == r0,
45 (Self::Custom(l0), Self::Custom(r0)) => Arc::ptr_eq(l0, r0),
46 _ => false,
47 }
48 }
49}
50
51pub type PaintRef<'a> = Paint<ImageBrushRef<'a>, &'a Gradient, &'a (dyn Any + Send + Sync)>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected