pub struct ComponentSource {
pub base_dir: Option<PathBuf>,
}Expand description
Resolve <ComponentSource path="..." /> JSX nodes by reading the
referenced file (or directory of files) and injecting one
CodeBlock child per file. The JSX wrapper stays so consumers can
render Preview/Code chrome around the resolved source. PrettyCode
then highlights every injected CodeBlock natively.
Fields§
§base_dir: Option<PathBuf>Implementations§
Source§impl ComponentSource
impl ComponentSource
pub fn with_base_dir(p: impl Into<PathBuf>) -> Self
Trait Implementations§
Source§impl Default for ComponentSource
impl Default for ComponentSource
Source§fn default() -> ComponentSource
fn default() -> ComponentSource
Returns the “default value” for a type. Read more
Source§impl Transformer for ComponentSource
impl Transformer for ComponentSource
Auto Trait Implementations§
impl Freeze for ComponentSource
impl RefUnwindSafe for ComponentSource
impl Send for ComponentSource
impl Sync for ComponentSource
impl Unpin for ComponentSource
impl UnsafeUnpin for ComponentSource
impl UnwindSafe for ComponentSource
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