pub struct RcWeak<T>where
T: ?Sized,{ /* private fields */ }Expand description
A serializable runtime wrapper around std::rc::Weak<T>.
RcWeak<T> is designed for graph-like structures where nodes may need to hold
non-owning references to other nodes, and you still want them to round-trip
through serialization while preserving reference identity.
Implementations§
Trait Implementations§
impl<T> Eq for RcWeak<T>where
T: ?Sized,
impl<T> Send for RcWeak<T>
Source§impl<T> Serializer for RcWeak<T>where
T: Serializer<Target = T>,
impl<T> Serializer for RcWeak<T>where
T: Serializer<Target = T>,
type Target = RcWeak<T>
Source§fn write_data(
value: &RcWeak<T>,
context: &mut WriteContext<'_>,
) -> Result<(), Error>
fn write_data( value: &RcWeak<T>, context: &mut WriteContext<'_>, ) -> Result<(), Error>
Write the target body only.
Source§fn read_data(context: &mut ReadContext<'_>) -> Result<RcWeak<T>, Error>
fn read_data(context: &mut ReadContext<'_>) -> Result<RcWeak<T>, Error>
Read the target body only.
Source§fn default_value(context: &mut ReadContext<'_>) -> Result<RcWeak<T>, Error>
fn default_value(context: &mut ReadContext<'_>) -> Result<RcWeak<T>, 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.
impl<T> Sync for RcWeak<T>
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RcWeak<T>
impl<T> !UnwindSafe for RcWeak<T>
impl<T> Freeze for RcWeak<T>
impl<T> Unpin for RcWeak<T>
impl<T> UnsafeUnpin for RcWeak<T>
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