pub trait AsyncDecodeRecordRef {
// Required method
async fn decode_record_ref(&mut self) -> Result<Option<RecordRef<'_>>>;
}Available on crate feature
async only.Expand description
Async trait for types that decode references to DBN records of a dynamic type.
Required Methods§
Sourceasync fn decode_record_ref(&mut self) -> Result<Option<RecordRef<'_>>>
async fn decode_record_ref(&mut self) -> Result<Option<RecordRef<'_>>>
Tries to decode a generic reference a record. Returns Ok(None) if input
has been exhausted.
§Errors
This function returns an error if the underlying reader returns an error of a
kind other than io::ErrorKind::UnexpectedEof upon reading.
If the length property of the record is invalid, an
Error::Decode will be returned.
§Cancel safety
This method is cancel safe. It can be used within a tokio::select! statement
without the potential for corrupting the input stream.
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.