[−][src]Trait dyno::Tagged
Sealed trait representing a type-erased tagged object.
Required methods
Loading content...Implementations
impl<'a> dyn Tagged<'a>
[src]
pub fn tag_ref<I>(value: &I::Type) -> &dyn Tagged<'a> where
I: Tag<'a>,
[src]
I: Tag<'a>,
Tag a reference to a concrete type with a given Tag
.
This is like an unsizing coercion, but must be performed explicitly to specify the specific tag.
pub fn tag_mut<I>(value: &mut I::Type) -> &mut dyn Tagged<'a> where
I: Tag<'a>,
[src]
I: Tag<'a>,
Tag a reference to a concrete type with a given Tag
.
This is like an unsizing coercion, but must be performed explicitly to specify the specific tag.
pub fn tag_box<I>(value: Box<I::Type>) -> Box<dyn Tagged<'a>> where
I: Tag<'a>,
[src]
I: Tag<'a>,
Tag a Box of a concrete type with a given Tag
.
This is like an unsizing coercion, but must be performed explicitly to specify the specific tag.
pub fn is<I>(&self) -> bool where
I: Tag<'a>,
[src]
I: Tag<'a>,
Returns true
if the dynamic type is tagged with I
.
pub fn downcast_ref<I>(&self) -> Option<&I::Type> where
I: Tag<'a>,
[src]
I: Tag<'a>,
Returns some reference to the dynamic value if it is tagged with I
,
or None
if it isn't.
pub fn downcast_mut<I>(&mut self) -> Option<&mut I::Type> where
I: Tag<'a>,
[src]
I: Tag<'a>,
Returns some reference to the dynamic value if it is tagged with I
,
or None
if it isn't.
pub fn downcast_box<I>(self: Box<Self>) -> Result<Box<I::Type>, Box<Self>> where
I: Tag<'a>,
[src]
I: Tag<'a>,