pub struct UnknownCase { /* private fields */ }Implementations§
Source§impl UnknownCase
impl UnknownCase
Sourcepub fn new<T>(case_id: u32, value: T) -> UnknownCase
pub fn new<T>(case_id: u32, value: T) -> UnknownCase
Creates a fresh carrier for user-supplied unknown payloads.
Replay metadata is owned by the runtime read path; public construction always uses the ordinary Any writer.
pub fn case_id(&self) -> u32
pub fn value(&self) -> &(dyn Any + Send + Sync + 'static)
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: Any,
Trait Implementations§
Source§impl Clone for UnknownCase
impl Clone for UnknownCase
Source§fn clone(&self) -> UnknownCase
fn clone(&self) -> UnknownCase
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnknownCase
impl Debug for UnknownCase
impl Eq for UnknownCase
Source§impl Hash for UnknownCase
impl Hash for UnknownCase
Source§impl PartialEq for UnknownCase
impl PartialEq for UnknownCase
Source§impl Serializer for UnknownCase
impl Serializer for UnknownCase
type Target = UnknownCase
Source§fn write_data(
value: &UnknownCase,
context: &mut WriteContext<'_>,
) -> Result<(), Error>
fn write_data( value: &UnknownCase, context: &mut WriteContext<'_>, ) -> Result<(), Error>
Write the target body only.
Source§fn read_data(context: &mut ReadContext<'_>) -> Result<UnknownCase, Error>
fn read_data(context: &mut ReadContext<'_>) -> Result<UnknownCase, Error>
Read the target body only.
Source§fn default_value(_: &mut ReadContext<'_>) -> Result<UnknownCase, Error>
fn default_value(_: &mut ReadContext<'_>) -> Result<UnknownCase, Error>
Construct a target for a null or missing local value.
Source§fn read_arc_any(
context: &mut ReadContext<'_>,
) -> Result<Arc<dyn Any + Send + Sync>, Error>
fn read_arc_any( context: &mut ReadContext<'_>, ) -> Result<Arc<dyn Any + Send + Sync>, Error>
Read directly into the final owner for sync dynamic carriers.
Auto Trait Implementations§
impl !RefUnwindSafe for UnknownCase
impl !UnwindSafe for UnknownCase
impl Freeze for UnknownCase
impl Send for UnknownCase
impl Sync for UnknownCase
impl Unpin for UnknownCase
impl UnsafeUnpin for UnknownCase
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