pub struct TextAnyEntry {
pub type_url: &'static str,
pub text_encode: fn(&[u8], &mut TextEncoder<'_>) -> Result,
pub text_merge: AnyTextMergeFn,
}Available on crate feature
text and (crate features json or text) only.Expand description
Registry entry for a single message type’s textproto ↔ Any conversion.
Carries fn-ptrs for the [type_url] { ... } expanded form. Unlike the
pre-split unified entry, these are non-Option — presence in the map
means the type has text-format support.
Fields§
§type_url: &'static strFull type URL (e.g. "type.googleapis.com/google.protobuf.Duration").
text_encode: fn(&[u8], &mut TextEncoder<'_>) -> ResultAny.value bytes → textproto body: decode, write fields as { ... }.
Does not write the [type_url] name — the encoder does that.
text_merge: AnyTextMergeFnTextproto { ... } body → Any.value bytes: merge into a fresh
instance, re-encode to wire bytes.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextAnyEntry
impl RefUnwindSafe for TextAnyEntry
impl Send for TextAnyEntry
impl Sync for TextAnyEntry
impl Unpin for TextAnyEntry
impl UnsafeUnpin for TextAnyEntry
impl UnwindSafe for TextAnyEntry
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