pub struct Ref<'a, T, C>(pub &'a T, pub PhantomData<C>);Tuple Fields§
§0: &'a T§1: PhantomData<C>Trait Implementations§
Auto Trait Implementations§
impl<'a, T, C> Forget for Ref<'a, T, C>
impl<'a, T, C> Freeze for Ref<'a, T, C>
impl<'a, T, C> Move for Ref<'a, T, C>
impl<'a, T, C> RefUnwindSafe for Ref<'a, T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<'a, T, C> Send for Ref<'a, T, C>
impl<'a, T, C> Sync for Ref<'a, T, C>
impl<'a, T, C> Unpin for Ref<'a, T, C>
impl<'a, T, C> UnsafeUnpin for Ref<'a, T, C>
impl<'a, T, C> UnwindSafe for Ref<'a, T, C>
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
Source§impl<T> Output for T
impl<T> Output for T
Source§fn write_json_to(&self, out: &mut dyn Write) -> Result<(), Error>
fn write_json_to(&self, out: &mut dyn Write) -> Result<(), Error>
Stream serialization to a bounded sink. Custom erased outputs can
override this to avoid the default intermediate JSON value.
fn to_json(&self) -> Value
Source§fn write_json(&self, out: &mut Vec<u8>) -> Result<(), Error>
fn write_json(&self, out: &mut Vec<u8>) -> Result<(), Error>
Serializes into
out. Every serializable output writes straight to
bytes; this default, for other implementors, goes through to_json.Source§fn write_json_split(
&self,
members: &[MemberInfo],
out: &mut Vec<u8>,
) -> Result<Vec<(&'static str, String)>, Error>
fn write_json_split( &self, members: &[MemberInfo], out: &mut Vec<u8>, ) -> Result<Vec<(&'static str, String)>, Error>
Serializes into
out without the members members binds to
headers, returning those as (header, text); with a payload member,
out gets that member’s bytes, raw. The default goes through
to_json, as write_json’s does.