pub struct DynamicRef<'a> {
pub ty: &'a Type,
pub value: &'a Value,
/* private fields */
}Expand description
A borrowed dynamic value, for encoding.
Fields§
§ty: &'a Type§value: &'a ValueImplementations§
Trait Implementations§
Source§impl<'a> Clone for DynamicRef<'a>
impl<'a> Clone for DynamicRef<'a>
Source§fn clone(&self) -> DynamicRef<'a>
fn clone(&self) -> DynamicRef<'a>
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<'a> Debug for DynamicRef<'a>
impl<'a> Debug for DynamicRef<'a>
Source§impl Encode for DynamicRef<'_>
impl Encode for DynamicRef<'_>
Source§fn describe_value(&self, d: &mut Describer<'_>) -> Result<i64>
fn describe_value(&self, d: &mut Describer<'_>) -> Result<i64>
The wire type id of this value. For a
GobType this is Self::describe; a dynamic
value describes itself from its contents.Source§fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Whether Go would omit this value as a struct field (encode.go,
encOpFor): a zero
number or false, an empty string, slice or byte slice, a nil map, pointer or interface.
Structs and arrays are never omitted, even when zero.Source§fn frames_as_struct(&self) -> bool
fn frames_as_struct(&self) -> bool
Whether this value is framed as a struct at top level and inside an interface. Everything
else, including a type with a marshaler, is a “singleton”: a zero delta, then the value.
Auto Trait Implementations§
impl<'a> Freeze for DynamicRef<'a>
impl<'a> RefUnwindSafe for DynamicRef<'a>
impl<'a> Send for DynamicRef<'a>
impl<'a> Sync for DynamicRef<'a>
impl<'a> Unpin for DynamicRef<'a>
impl<'a> UnsafeUnpin for DynamicRef<'a>
impl<'a> UnwindSafe for DynamicRef<'a>
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