pub trait ProtobufMut<'pool>: ProtobufRef<'pool> {
// Required method
fn as_object_mut(&mut self) -> &mut Object;
// Provided methods
fn decode_flat<const STACK_DEPTH: usize>(
&mut self,
arena: &mut Arena<'_>,
buf: &[u8],
) -> bool { ... }
fn decode<'a, E>(
&mut self,
arena: &mut Arena<'_>,
provider: &'a mut impl FnMut() -> Result<Option<&'a [u8]>, E>,
) -> Result<(), Error<E>> { ... }
fn async_decode<'a, E, F>(
&'a mut self,
arena: &mut Arena<'_>,
provider: &'a mut impl FnMut() -> F,
) -> impl Future<Output = Result<(), Error<E>>>
where F: Future<Output = Result<Option<&'a [u8]>, E>> + 'a { ... }
fn decode_from_bufread<const STACK_DEPTH: usize>(
&mut self,
arena: &mut Arena<'_>,
reader: &mut impl BufRead,
) -> Result<(), Error<Error>> { ... }
fn decode_from_read<const STACK_DEPTH: usize>(
&mut self,
arena: &mut Arena<'_>,
reader: &mut impl Read,
) -> Result<(), Error<Error>> { ... }
fn decode_from_async_bufread<'a, const STACK_DEPTH: usize>(
&'a mut self,
arena: &'a mut Arena<'a>,
reader: &mut (impl AsyncBufRead + Unpin),
) -> impl Future<Output = Result<(), Error<Error>>> { ... }
fn decode_from_async_read<'a, const STACK_DEPTH: usize>(
&'a mut self,
arena: &'a mut Arena<'a>,
reader: &mut (impl AsyncRead + Unpin),
) -> impl Future<Output = Result<(), Error<Error>>> { ... }
fn serde_deserialize<'arena, 'alloc, 'de, D>(
&'de mut self,
arena: &'arena mut Arena<'alloc>,
deserializer: D,
) -> Result<(), D::Error>
where D: Deserializer<'de> { ... }
}Expand description
Mutable protobuf operations (decode, deserialize). Extends ProtobufRef with mutation capabilities.
Required Methods§
fn as_object_mut(&mut self) -> &mut Object
Provided Methods§
fn decode_flat<const STACK_DEPTH: usize>( &mut self, arena: &mut Arena<'_>, buf: &[u8], ) -> bool
fn decode<'a, E>( &mut self, arena: &mut Arena<'_>, provider: &'a mut impl FnMut() -> Result<Option<&'a [u8]>, E>, ) -> Result<(), Error<E>>
fn async_decode<'a, E, F>( &'a mut self, arena: &mut Arena<'_>, provider: &'a mut impl FnMut() -> F, ) -> impl Future<Output = Result<(), Error<E>>>
fn decode_from_bufread<const STACK_DEPTH: usize>( &mut self, arena: &mut Arena<'_>, reader: &mut impl BufRead, ) -> Result<(), Error<Error>>
fn decode_from_read<const STACK_DEPTH: usize>( &mut self, arena: &mut Arena<'_>, reader: &mut impl Read, ) -> Result<(), Error<Error>>
fn decode_from_async_bufread<'a, const STACK_DEPTH: usize>( &'a mut self, arena: &'a mut Arena<'a>, reader: &mut (impl AsyncBufRead + Unpin), ) -> impl Future<Output = Result<(), Error<Error>>>
fn decode_from_async_read<'a, const STACK_DEPTH: usize>( &'a mut self, arena: &'a mut Arena<'a>, reader: &mut (impl AsyncRead + Unpin), ) -> impl Future<Output = Result<(), Error<Error>>>
fn serde_deserialize<'arena, 'alloc, 'de, D>(
&'de mut self,
arena: &'arena mut Arena<'alloc>,
deserializer: D,
) -> Result<(), D::Error>where
D: Deserializer<'de>,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.