pub struct CompanionFile {
pub output_name: String,
pub bytes: Vec<u8>,
pub source_path: PathBuf,
pub title: String,
pub source_dir: String,
pub stem: String,
}Expand description
Parser-side companion file discovered beside contract inputs.
Used during parse and companion discovery; converted to wire Companion
via companion_files_to_stored. The
source_path field is parser-local and not serialized on the wire.
Fields§
§output_name: StringOutput filename for the companion in the rendered book.
bytes: Vec<u8>Raw companion file bytes.
source_path: PathBufFilesystem path where the companion was discovered.
Parser-local provenance only; not serialized on the wire.
title: StringHuman nav label (first markdown heading or humanized stem).
source_dir: StringLogical source directory relative to corpus root (slash-separated).
stem: StringSource filename stem (e.g. README, MOVING-TO-V2).
Trait Implementations§
Source§impl Clone for CompanionFile
impl Clone for CompanionFile
Source§fn clone(&self) -> CompanionFile
fn clone(&self) -> CompanionFile
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 CompanionFile
impl Debug for CompanionFile
impl Eq for CompanionFile
Source§impl PartialEq for CompanionFile
impl PartialEq for CompanionFile
Source§fn eq(&self, other: &CompanionFile) -> bool
fn eq(&self, other: &CompanionFile) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CompanionFile
Auto Trait Implementations§
impl Freeze for CompanionFile
impl RefUnwindSafe for CompanionFile
impl Send for CompanionFile
impl Sync for CompanionFile
impl Unpin for CompanionFile
impl UnsafeUnpin for CompanionFile
impl UnwindSafe for CompanionFile
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