pub struct HostPacks { /* private fields */ }Expand description
The bundle’s packs, then the store’s, as compmd::host::Packs, with the policy and the ambient packs the bundle’s
configuration made, so a document processed in Rust is held to what the page’s path holds it to (hosting,
decision 7). It shares the bundle and the store, which the host keeps, so the processor, which keeps its packs while
it processes, can be given it.
let packs = HostPacks::new(Arc::new(bundle), Arc::new(NoStore));
let (policy, ambient) = (packs.policy()?, packs.ambient());
let resolved = Processor::new("a.comp.md", "# A\n")
.parse(&ParseOptions::default())
.resolve_with((), packs, &ambient, &policy);Implementations§
Source§impl HostPacks
impl HostPacks
Sourcepub fn new(bundle: Arc<Bundle>, store: Arc<dyn Store>) -> Self
pub fn new(bundle: Arc<Bundle>, store: Arc<dyn Store>) -> Self
The packs of bundle, then of store.
Sourcepub fn policy(&self) -> Result<Policy, ManifestError>
pub fn policy(&self) -> Result<Policy, ManifestError>
The processor’s policy the bundle’s configuration made (its deny, imports, refused and the packs’ trust):
the default policy when the manifest has none.
§Errors
ManifestError::Policy when the manifest’s policy isn’t the processor’s.
Trait Implementations§
Source§impl Packs for HostPacks
impl Packs for HostPacks
Source§fn pack_file(&self, place: &Place) -> Option<String>
fn pack_file(&self, place: &Place) -> Option<String>
The file at
place, in a release of a pack: package.json, the pack’s document, or a file it imports.Auto Trait Implementations§
impl !RefUnwindSafe for HostPacks
impl !UnwindSafe for HostPacks
impl Forget for HostPacks
impl Freeze for HostPacks
impl Move for HostPacks
impl Send for HostPacks
impl Sync for HostPacks
impl Unpin for HostPacks
impl UnsafeUnpin for HostPackswhere
*const ArcInner<Bundle> is !null: UnsafeUnpin,
PhantomData<ArcInner<Bundle>>: UnsafeUnpin,
*const ArcInner<dyn Store> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn Store>>: UnsafeUnpin,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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 more