pub struct CodeImport {
pub base_dir: Option<PathBuf>,
}Expand description
Resolve file=path[{ranges}] directives in fenced code-block info
strings, replacing the block’s body with the file contents (optionally
sliced by 1-based line ranges).
Path resolution (first hit wins):
- explicit
base_dir(viaCodeImport::with_base_dir) - parent dir of
meta.originwhen it’sOrigin::File - cwd, with a
Code::BaseDirNotFoundwarning (paths must be absolute)
Fields§
§base_dir: Option<PathBuf>Implementations§
Source§impl CodeImport
impl CodeImport
Trait Implementations§
Source§impl Default for CodeImport
impl Default for CodeImport
Source§impl Transformer for CodeImport
impl Transformer for CodeImport
Auto Trait Implementations§
impl Freeze for CodeImport
impl RefUnwindSafe for CodeImport
impl Send for CodeImport
impl Sync for CodeImport
impl Unpin for CodeImport
impl UnsafeUnpin for CodeImport
impl UnwindSafe for CodeImport
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more