[−][src]Struct gf::support::protobuf::TaggedData
Arbitrary data tagged with data format, version, and a collection of key-value metadata.
Fields
tag: String
Data format tag.
version: NonZeroU32
Data format version (within the tag namespace).
metadata: HashMap<String, String>
Metadata key-value pairs.
payload: Vec<u8>
Payload.
Implementations
impl TaggedData
[src]
pub fn from_bytes(bytes: &[u8]) -> Result<Self, ProtobufError>
[src]
Deserialize from a slice of bytes.
pub fn to_bytes(&self) -> Vec<u8>
[src]
Serialize to a vector of bytes.
pub fn read_from_file<P: AsRef<Path>>(path: P) -> Result<Self>
[src]
Read tagged data from file.
pub fn write_to_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
Write tagged data to file.
Trait Implementations
impl Clone for TaggedData
[src]
fn clone(&self) -> TaggedData
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for TaggedData
[src]
impl Eq for TaggedData
[src]
impl PartialEq<TaggedData> for TaggedData
[src]
fn eq(&self, other: &TaggedData) -> bool
[src]
fn ne(&self, other: &TaggedData) -> bool
[src]
impl StructuralEq for TaggedData
[src]
impl StructuralPartialEq for TaggedData
[src]
Auto Trait Implementations
impl RefUnwindSafe for TaggedData
impl Send for TaggedData
impl Sync for TaggedData
impl Unpin for TaggedData
impl UnwindSafe for TaggedData
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
pub fn equivalent(&self, key: &K) -> bool
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,