pub struct AnyInString(pub Value);Expand description
hcsshim’s AnyInString — a JSON value that is wire-encoded as a JSON
string whose content is the escaped JSON of the inner value
(double-encoded).
Mirrors hcsshim’s internal/gcs/prot/protocol.go:
type AnyInString struct { Value interface{} }
func (a *AnyInString) MarshalText() ([]byte, error) { return json.Marshal(a.Value) }Because AnyInString implements MarshalText, the outer json.Marshal
emits the field as a JSON string containing the escaped JSON of the inner
value. The inbox guest GCS uses a STRICT JSON unmarshaller (hcsshim issue
#2714) that rejects unknown/misnamed fields and tears down the VM, so the
double-encoding must match exactly.
Tuple Fields§
§0: ValueImplementations§
Trait Implementations§
Source§impl Clone for AnyInString
impl Clone for AnyInString
Source§fn clone(&self) -> AnyInString
fn clone(&self) -> AnyInString
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 AnyInString
impl Debug for AnyInString
Source§impl<'de> Deserialize<'de> for AnyInString
impl<'de> Deserialize<'de> for AnyInString
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AnyInString
Source§impl From<Value> for AnyInString
impl From<Value> for AnyInString
Source§impl PartialEq for AnyInString
impl PartialEq for AnyInString
Source§fn eq(&self, other: &AnyInString) -> bool
fn eq(&self, other: &AnyInString) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AnyInString
impl Serialize for AnyInString
impl StructuralPartialEq for AnyInString
Auto Trait Implementations§
impl Freeze for AnyInString
impl RefUnwindSafe for AnyInString
impl Send for AnyInString
impl Sync for AnyInString
impl Unpin for AnyInString
impl UnsafeUnpin for AnyInString
impl UnwindSafe for AnyInString
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