[−][src]Trait amq_protocol::frame::BackToTheBuffer
Trait for Write
types that allow skipping and reserving a slice, then writing some data,
then write something in the slice we reserved using the return for our data write.
Required methods
fn reserve_write_use<Tmp, Gen, Before>(
s: WriteContext<Self>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<Self>, GenError> where
Before: Fn(WriteContext<Self>, Tmp) -> Result<WriteContext<Self>, GenError>,
Gen: Fn(WriteContext<Self>) -> Result<(WriteContext<Self>, Tmp), GenError>,
s: WriteContext<Self>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<Self>, GenError> where
Before: Fn(WriteContext<Self>, Tmp) -> Result<WriteContext<Self>, GenError>,
Gen: Fn(WriteContext<Self>) -> Result<(WriteContext<Self>, Tmp), GenError>,
Implementations on Foreign Types
impl BackToTheBuffer for Vec<u8>
[src]
pub fn reserve_write_use<Tmp, Gen, Before>(
s: WriteContext<Vec<u8>>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<Vec<u8>>, GenError> where
Before: Fn(WriteContext<Vec<u8>>, Tmp) -> Result<WriteContext<Vec<u8>>, GenError>,
Gen: Fn(WriteContext<Vec<u8>>) -> Result<(WriteContext<Vec<u8>>, Tmp), GenError>,
[src]
s: WriteContext<Vec<u8>>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<Vec<u8>>, GenError> where
Before: Fn(WriteContext<Vec<u8>>, Tmp) -> Result<WriteContext<Vec<u8>>, GenError>,
Gen: Fn(WriteContext<Vec<u8>>) -> Result<(WriteContext<Vec<u8>>, Tmp), GenError>,
impl<'_> BackToTheBuffer for &'_ mut [u8]
[src]
pub fn reserve_write_use<Tmp, Gen, Before>(
s: WriteContext<&'_ mut [u8]>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<&'_ mut [u8]>, GenError> where
Before: Fn(WriteContext<&'_ mut [u8]>, Tmp) -> Result<WriteContext<&'_ mut [u8]>, GenError>,
Gen: Fn(WriteContext<&'_ mut [u8]>) -> Result<(WriteContext<&'_ mut [u8]>, Tmp), GenError>,
[src]
s: WriteContext<&'_ mut [u8]>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<&'_ mut [u8]>, GenError> where
Before: Fn(WriteContext<&'_ mut [u8]>, Tmp) -> Result<WriteContext<&'_ mut [u8]>, GenError>,
Gen: Fn(WriteContext<&'_ mut [u8]>) -> Result<(WriteContext<&'_ mut [u8]>, Tmp), GenError>,
Implementors
impl<W> BackToTheBuffer for W where
W: Seek,
[src]
W: Seek,
pub fn reserve_write_use<Tmp, Gen, Before>(
s: WriteContext<W>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<W>, GenError> where
Before: Fn(WriteContext<W>, Tmp) -> Result<WriteContext<W>, GenError>,
Gen: Fn(WriteContext<W>) -> Result<(WriteContext<W>, Tmp), GenError>,
[src]
s: WriteContext<W>,
reserved: usize,
gen: &Gen,
before: &Before
) -> Result<WriteContext<W>, GenError> where
Before: Fn(WriteContext<W>, Tmp) -> Result<WriteContext<W>, GenError>,
Gen: Fn(WriteContext<W>) -> Result<(WriteContext<W>, Tmp), GenError>,