pub trait ConsumeBinaryHunkDelegate {
// Required method
fn consume_binary_hunk(
&mut self,
header: HunkHeader,
header_str: &str,
hunk: &[u8],
) -> Result<()>;
}Available on crate feature
blob only.Expand description
A trait for use in conjunction with ConsumeBinaryHunk.
Required Methods§
Sourcefn consume_binary_hunk(
&mut self,
header: HunkHeader,
header_str: &str,
hunk: &[u8],
) -> Result<()>
fn consume_binary_hunk( &mut self, header: HunkHeader, header_str: &str, hunk: &[u8], ) -> Result<()>
Consume a single hunk in unified diff format, along with its header_str that already has a trailing newline added based
on the parent ConsumeBinaryHunk configuration, also in unified diff format.
The header is the data used to produce header_str.
Implementations on Foreign Types§
Source§impl ConsumeBinaryHunkDelegate for String
An implementation that fails if the input isn’t UTF-8.
impl ConsumeBinaryHunkDelegate for String
An implementation that fails if the input isn’t UTF-8.
fn consume_binary_hunk( &mut self, _header: HunkHeader, header_str: &str, hunk: &[u8], ) -> Result<()>
Source§impl ConsumeBinaryHunkDelegate for Vec<u8>
An implementation that writes hunks into a byte buffer.
impl ConsumeBinaryHunkDelegate for Vec<u8>
An implementation that writes hunks into a byte buffer.
fn consume_binary_hunk( &mut self, _header: HunkHeader, header_str: &str, hunk: &[u8], ) -> Result<()>
Source§impl ConsumeBinaryHunkDelegate for BString
An implementation that writes hunks into a hunman-readable byte buffer.
impl ConsumeBinaryHunkDelegate for BString
An implementation that writes hunks into a hunman-readable byte buffer.