pub struct LocalDirSource { /* private fields */ }Expand description
Re-export of the full boot surface (D-11) so Shape A/B consumers register a
served workbook WITHOUT ever naming pmcp-workbook-runtime: the
BundleSource trait + its on-disk impl, the fail-closed loader entry point,
and both error types. The EmbeddedSource impl is re-exported separately
under the workbook-embedded feature (it needs the runtime’s embedded
include_dir support).
A BundleSource that reads a bundle from a directory tree on disk.
One LocalDirSource wraps ONE bundle root = one bundle@version (D-08); the
member name is joined onto the root to read bytes. list_artifacts walks
the tree recursively and returns sorted bundle-relative paths.
Implementations§
Source§impl LocalDirSource
impl LocalDirSource
Sourcepub fn new(path: impl Into<PathBuf>) -> LocalDirSource
pub fn new(path: impl Into<PathBuf>) -> LocalDirSource
Wrap the bundle directory rooted at path.
Trait Implementations§
Source§impl BundleSource for LocalDirSource
impl BundleSource for LocalDirSource
Source§fn read_artifact(&self, name: &str) -> Result<Vec<u8>, BundleSourceError>
fn read_artifact(&self, name: &str) -> Result<Vec<u8>, BundleSourceError>
Return the EXACT bytes of the member named
name (a bundle-relative
path such as "manifest.json" or "evidence/changelog.json"). Read moreSource§fn list_artifacts(&self) -> Result<Vec<String>, BundleSourceError>
fn list_artifacts(&self) -> Result<Vec<String>, BundleSourceError>
Return the SORTED list of every member’s bundle-relative path
(including nested members like
"evidence/changelog.json"). Read moreSource§impl Clone for LocalDirSource
impl Clone for LocalDirSource
Source§fn clone(&self) -> LocalDirSource
fn clone(&self) -> LocalDirSource
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 moreAuto Trait Implementations§
impl Freeze for LocalDirSource
impl RefUnwindSafe for LocalDirSource
impl Send for LocalDirSource
impl Sync for LocalDirSource
impl Unpin for LocalDirSource
impl UnsafeUnpin for LocalDirSource
impl UnwindSafe for LocalDirSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreCreates a shared type from an unshared type.