pub struct Bundle { /* private fields */ }Expand description
A bundle the host serves.
Implementations§
Source§impl Bundle
impl Bundle
Sourcepub fn embedded(
files: &'static [(&'static str, &'static [u8])],
) -> Result<Self, BundleError>
pub fn embedded( files: &'static [(&'static str, &'static [u8])], ) -> Result<Self, BundleError>
The bundle embedded in a binary: its files by path, sorted, manifest.json among them.
§Errors
BundleError when it has no manifest, or one that can’t be used.
Sourcepub fn read(folder: &Path) -> Result<Self, BundleError>
pub fn read(folder: &Path) -> Result<Self, BundleError>
Sourcepub fn from_files<P: Into<String>>(
files: impl IntoIterator<Item = (P, Vec<u8>)>,
) -> Result<Self, BundleError>
pub fn from_files<P: Into<String>>( files: impl IntoIterator<Item = (P, Vec<u8>)>, ) -> Result<Self, BundleError>
A bundle of files, by path, manifest.json among them: for a host’s tests.
§Errors
BundleError when it has no manifest, or one that can’t be used.
Sourcepub fn frame_file(&self, path: &FilePath) -> Option<Vec<u8>>
pub fn frame_file(&self, path: &FilePath) -> Option<Vec<u8>>
The bytes of the frames’ file at path, inside frames/<hash>/.
Sourcepub fn pack_file(&self, place: &Place) -> Option<Vec<u8>>
pub fn pack_file(&self, place: &Place) -> Option<Vec<u8>>
The bytes of the pack file at place, packs/<place>, when the bundle holds that release.
Sourcepub fn pack_file_or(&self, store: &dyn Store, place: &Place) -> Option<Vec<u8>>
pub fn pack_file_or(&self, store: &dyn Store, place: &Place) -> Option<Vec<u8>>
The bytes of the pack file at place: the bundle’s, then store’s for a release the bundle doesn’t hold, as
the serving contract and the processor’s packs both read them.
Sourcepub fn frames_base(&self, origin: &str) -> String
pub fn frames_base(&self, origin: &str) -> String
The frames’ base on origin (compmd://localhost, https://frames.example), as @compmd/sandbox takes it.
Trait Implementations§
impl StructuralPartialEq for Bundle
Auto Trait Implementations§
impl Forget for Bundle
impl Freeze for Bundlewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<BundledPack>: Freeze,
PhantomData<Library>: Freeze,
PhantomData<Value>: Freeze,
PhantomData<usize>: Freeze,
PhantomData<Bucket<String, Value>>: Freeze,
PhantomData<PackName>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
&'static [(&'static str, &'static [u8])]: Freeze,
*const LeafNode<String, Vec<u8>> is !null: Freeze,
PhantomData<Box<(String, Vec<u8>)>>: Freeze,
impl Move for Bundle
impl RefUnwindSafe for Bundle
impl Send for Bundlewhere
RawVecInner: Send,
Identifier: Send,
NodeRef<Owned, FilePath, Integrity, LeafOrInternal>: Send,
BoxRaw<(FilePath, Integrity)>: Send,
RawTable<usize>: Send,
NodeRef<Owned, String, String, LeafOrInternal>: Send,
BoxRaw<(String, String)>: Send,
&'static [(&'static str, &'static [u8])]: Send,
NodeRef<Owned, String, Vec<u8>, LeafOrInternal>: Send,
BoxRaw<(String, Vec<u8>)>: Send,
impl Sync for Bundlewhere
RawVecInner: Sync,
Identifier: Sync,
NodeRef<Owned, FilePath, Integrity, LeafOrInternal>: Sync,
BoxRaw<(FilePath, Integrity)>: Sync,
RawTable<usize>: Sync,
NodeRef<Owned, String, String, LeafOrInternal>: Sync,
BoxRaw<(String, String)>: Sync,
NodeRef<Owned, String, Vec<u8>, LeafOrInternal>: Sync,
BoxRaw<(String, Vec<u8>)>: Sync,
impl Unpin for Bundlewhere
*const u8 is !null: Unpin,
*const LeafNode<FilePath, Integrity> is !null: Unpin,
Box<(FilePath, Integrity)>: Unpin,
*const LeafNode<String, String> is !null: Unpin,
Box<(String, String)>: Unpin,
&'static [(&'static str, &'static [u8])]: Unpin,
*const LeafNode<String, Vec<u8>> is !null: Unpin,
Box<(String, Vec<u8>)>: Unpin,
impl UnsafeUnpin for Bundlewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<BundledPack>: UnsafeUnpin,
PhantomData<Library>: UnsafeUnpin,
PhantomData<Value>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
PhantomData<Bucket<String, Value>>: UnsafeUnpin,
PhantomData<PackName>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
&'static [(&'static str, &'static [u8])]: UnsafeUnpin,
*const LeafNode<String, Vec<u8>> is !null: UnsafeUnpin,
PhantomData<Box<(String, Vec<u8>)>>: UnsafeUnpin,
impl UnwindSafe for Bundlewhere
RawVecInner: UnwindSafe,
NonNull<u8>: UnwindSafe,
BTreeMap<FilePath, Integrity>: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
&'static [(&'static str, &'static [u8])]: UnwindSafe,
BTreeMap<String, Vec<u8>>: UnwindSafe,
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