pub struct LocalOnly<T>(pub T);
Expand description
A wrapper type that skips serializing the type and fails deserialization. This allows the type to be used in a MeshPayload derive but will fail when sent across a process boundary at runtime.
Tuple Fields§
§0: T
Trait Implementations§
Source§impl<T> DefaultEncoding for LocalOnly<T>
impl<T> DefaultEncoding for LocalOnly<T>
Source§type Encoding = LocalOnlyField
type Encoding = LocalOnlyField
The encoding to use for the serialization. Read more
Auto Trait Implementations§
impl<T> Freeze for LocalOnly<T>where
T: Freeze,
impl<T> RefUnwindSafe for LocalOnly<T>where
T: RefUnwindSafe,
impl<T> Send for LocalOnly<T>where
T: Send,
impl<T> Sync for LocalOnly<T>where
T: Sync,
impl<T> Unpin for LocalOnly<T>where
T: Unpin,
impl<T> UnwindSafe for LocalOnly<T>where
T: UnwindSafe,
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