pub trait WriteExt {
// Required methods
fn write_protobuf<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: &'life1 (impl 'async_trait + Message),
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn write_magics<'life0, 'life1, 'async_trait>(
&'life0 mut self,
pos: usize,
major_version: i16,
minor_version: i16,
magic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn write_struct<'b, 'life0, 'async_trait, M, T>(
&'life0 mut self,
obj: &'b T,
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where M: 'async_trait + Message + From<&'b T>,
T: 'async_trait + ProtoStruct<Proto = M> + Send + Sync + 'b,
Self: Send + 'async_trait,
'b: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
Lance Write Extension.
Required Methods§
Sourcefn write_protobuf<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: &'life1 (impl 'async_trait + Message),
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_protobuf<'life0, 'life1, 'async_trait>(
&'life0 mut self,
msg: &'life1 (impl 'async_trait + Message),
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write a Protobuf message to the Writer, and returns the file position where the protobuf is written.
Sourcefn write_magics<'life0, 'life1, 'async_trait>(
&'life0 mut self,
pos: usize,
major_version: i16,
minor_version: i16,
magic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_magics<'life0, 'life1, 'async_trait>(
&'life0 mut self,
pos: usize,
major_version: i16,
minor_version: i16,
magic: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write magics to the tail of a file before closing the file.
Provided Methods§
fn write_struct<'b, 'life0, 'async_trait, M, T>( &'life0 mut self, obj: &'b T, ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
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.