pub struct ProtobufCodec;Expand description
Reference protobuf codec using buffa-generated types from canardleteer.switchback.v1alpha1.
Implements SwitchbackCodec (async-primary) and SyncSwitchbackCodec
per ADR 0002.
Encode and decode are in-memory and synchronous; the async trait methods
delegate to the same helpers without blocking on I/O.
Implementations§
Source§impl ProtobufCodec
impl ProtobufCodec
Sourcepub fn serialize_sync(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
pub fn serialize_sync(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
Serialize a ReferenceManual to protobuf wire bytes.
Sourcepub fn deserialize_sync(&self, bytes: &[u8]) -> Result<ReferenceManual>
pub fn deserialize_sync(&self, bytes: &[u8]) -> Result<ReferenceManual>
Deserialize protobuf wire bytes into a ReferenceManual.
Trait Implementations§
Source§impl Clone for ProtobufCodec
impl Clone for ProtobufCodec
Source§fn clone(&self) -> ProtobufCodec
fn clone(&self) -> ProtobufCodec
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 moreimpl Copy for ProtobufCodec
Source§impl Debug for ProtobufCodec
impl Debug for ProtobufCodec
Source§impl Default for ProtobufCodec
impl Default for ProtobufCodec
Source§fn default() -> ProtobufCodec
fn default() -> ProtobufCodec
Returns the “default value” for a type. Read more
Source§impl SwitchbackCodec for ProtobufCodec
impl SwitchbackCodec for ProtobufCodec
Source§async fn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
async fn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
Serializes a reference manual to switchback wire bytes.
Source§async fn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>
async fn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>
Deserializes switchback wire bytes into a reference manual.
Source§impl SyncSwitchbackCodec for ProtobufCodec
impl SyncSwitchbackCodec for ProtobufCodec
Source§fn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
fn serialize(&self, manual: &ReferenceManual) -> Result<Vec<u8>>
Serializes a reference manual to switchback wire bytes.
Source§fn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>
fn deserialize(&self, bytes: &[u8]) -> Result<ReferenceManual>
Deserializes switchback wire bytes into a reference manual.
Auto Trait Implementations§
impl Freeze for ProtobufCodec
impl RefUnwindSafe for ProtobufCodec
impl Send for ProtobufCodec
impl Sync for ProtobufCodec
impl Unpin for ProtobufCodec
impl UnsafeUnpin for ProtobufCodec
impl UnwindSafe for ProtobufCodec
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