pub struct SinglePartTxBuffer(/* private fields */);Expand description
A witness type that proves the buffer is backed by one part only
and thus can be converted into &[u8].
Implementations§
Source§impl SinglePartTxBuffer
impl SinglePartTxBuffer
Sourcepub fn new(buffer: Buffer<Tx>, len: usize) -> Option<Self>
pub fn new(buffer: Buffer<Tx>, len: usize) -> Option<Self>
Creates a new SinglePartTxBuffer from a Buffer<Tx> if it is
backed by one part only.
Sourcepub fn into_inner(self) -> Buffer<Tx>
pub fn into_inner(self) -> Buffer<Tx>
Converts back to a Tx buffer.
Trait Implementations§
Source§impl AsMut<[u8]> for SinglePartTxBuffer
impl AsMut<[u8]> for SinglePartTxBuffer
Source§impl AsRef<[u8]> for SinglePartTxBuffer
impl AsRef<[u8]> for SinglePartTxBuffer
Source§impl FragmentedBuffer for SinglePartTxBuffer
impl FragmentedBuffer for SinglePartTxBuffer
Source§fn with_bytes<'a, R, F>(&'a self, f: F) -> Rwhere
F: for<'b> FnOnce(FragmentedBytes<'b, 'a>) -> R,
fn with_bytes<'a, R, F>(&'a self, f: F) -> Rwhere
F: for<'b> FnOnce(FragmentedBytes<'b, 'a>) -> R,
Invokes a callback on a view into this buffer’s contents as
FragmentedBytes.Auto Trait Implementations§
impl Freeze for SinglePartTxBuffer
impl !RefUnwindSafe for SinglePartTxBuffer
impl Send for SinglePartTxBuffer
impl Sync for SinglePartTxBuffer
impl Unpin for SinglePartTxBuffer
impl UnsafeUnpin for SinglePartTxBuffer
impl !UnwindSafe for SinglePartTxBuffer
Blanket Implementations§
Source§impl<O, B> AsFragmentedByteSlice<B> for O
impl<O, B> AsFragmentedByteSlice<B> for O
Source§fn as_fragmented_byte_slice(&mut self) -> FragmentedByteSlice<'_, B>
fn as_fragmented_byte_slice(&mut self) -> FragmentedByteSlice<'_, B>
Generates a
FragmentedByteSlice view of self.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