pub trait ParentDevice: Labeled {
// Required method
fn device(&self) -> &Arc<Device>;
// Provided methods
fn is_equal(self: &Arc<Self>, other: &Arc<Self>) -> bool { ... }
fn same_device_as<O: ParentDevice>(
&self,
other: &O,
) -> Result<(), DeviceError> { ... }
fn same_device(&self, device: &Device) -> Result<(), DeviceError> { ... }
}
Required Methods§
Provided Methods§
fn is_equal(self: &Arc<Self>, other: &Arc<Self>) -> bool
fn same_device_as<O: ParentDevice>(&self, other: &O) -> Result<(), DeviceError>
fn same_device(&self, device: &Device) -> Result<(), DeviceError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.