Enum icu_provider::any::AnyPayloadInner
source · enum AnyPayloadInner {
StructRef(&'static dyn Any),
PayloadRc(Rc<dyn Any>),
}
Expand description
Representations of the Any
trait object.
Important Note: The types enclosed by StructRef
and PayloadRc
are NOT the same!
The first refers to the struct itself, whereas the second refers to a DataPayload
.
Variants§
StructRef(&'static dyn Any)
A reference to M::Yokeable
PayloadRc(Rc<dyn Any>)
A boxed DataPayload<M>
.
Note: This needs to be reference counted, not a Box
, so that AnyPayload
is cloneable.
If an AnyPayload
is cloned, the actual cloning of the data is delayed until
downcast()
is invoked (at which point we have the concrete type).
Trait Implementations§
source§impl Clone for AnyPayloadInner
impl Clone for AnyPayloadInner
source§fn clone(&self) -> AnyPayloadInner
fn clone(&self) -> AnyPayloadInner
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 moreAuto Trait Implementations§
impl Freeze for AnyPayloadInner
impl !RefUnwindSafe for AnyPayloadInner
impl !Send for AnyPayloadInner
impl !Sync for AnyPayloadInner
impl Unpin for AnyPayloadInner
impl !UnwindSafe for AnyPayloadInner
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