pub enum OutputContent {
Text(String),
Binary(Vec<u8>),
}Expand description
Content of an output file.
Variants§
Implementations§
Source§impl OutputContent
impl OutputContent
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Size of the content in bytes — UTF-8 bytes for text, raw bytes for binary.
Exists so a caller that only wants to know whether a backend produced anything does not have to match on the variant. Five backend test suites were each carrying the same two-arm match, and in every one of them the text arm was unreachable, because those backends emit binary only.
Trait Implementations§
Source§impl Clone for OutputContent
impl Clone for OutputContent
Source§fn clone(&self) -> OutputContent
fn clone(&self) -> OutputContent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OutputContent
impl Debug for OutputContent
Auto Trait Implementations§
impl Freeze for OutputContent
impl RefUnwindSafe for OutputContent
impl Send for OutputContent
impl Sync for OutputContent
impl Unpin for OutputContent
impl UnsafeUnpin for OutputContent
impl UnwindSafe for OutputContent
Blanket Implementations§
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