pub trait AnyValueSizeless {
type Type: 'static;
// Required method
fn as_bytes_ptr(&self) -> *const u8;
// Provided methods
unsafe fn downcast_ref_unchecked<T>(&self) -> &T { ... }
unsafe fn downcast_unchecked<T: 'static>(self) -> T
where Self: Sized { ... }
unsafe fn move_into<KnownType: 'static>(
self,
out: *mut u8,
bytes_size: usize,
)
where Self: Sized { ... }
}Expand description
AnyValue that doesn’t know its size or type, and can provide only object ptr.
Required Associated Types§
Required Methods§
Sourcefn as_bytes_ptr(&self) -> *const u8
fn as_bytes_ptr(&self) -> *const u8
Aligned address.
Provided Methods§
unsafe fn downcast_ref_unchecked<T>(&self) -> &T
unsafe fn downcast_unchecked<T: 'static>(self) -> Twhere
Self: Sized,
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.