Struct holochain::prelude::CoordinatorBundle
source · pub struct CoordinatorBundle(_);
Expand description
A bundle of coordinator zomes.
Implementations
Methods from Deref<Target = Bundle<CoordinatorManifest>>
sourcepub async fn write_to_file(
&self,
path: &Path
) -> impl Future<Output = Result<(), MrBundleError>>
pub async fn write_to_file(
&self,
path: &Path
) -> impl Future<Output = Result<(), MrBundleError>>
Write a Bundle to a file
sourcepub async fn resolve(
&self,
location: &Location
) -> impl Future<Output = Result<Cow<'_, Vec<u8, Global>>, MrBundleError>>
pub async fn resolve(
&self,
location: &Location
) -> impl Future<Output = Result<Cow<'_, Vec<u8, Global>>, MrBundleError>>
Retrieve the bytes for a resource at a Location, downloading it if necessary
sourcepub async fn resolve_all(
&self
) -> impl Future<Output = Result<HashMap<Location, Cow<'_, Vec<u8, Global>>, RandomState>, MrBundleError>>
pub async fn resolve_all(
&self
) -> impl Future<Output = Result<HashMap<Location, Cow<'_, Vec<u8, Global>>, RandomState>, MrBundleError>>
Return the full set of resources specified by this bundle’s manifest. References to bundled resources can be returned directly, while all others will be fetched from the filesystem or the network.
sourcepub async fn resolve_all_cloned(
&self
) -> impl Future<Output = Result<HashMap<Location, Vec<u8, Global>, RandomState>, MrBundleError>>
pub async fn resolve_all_cloned(
&self
) -> impl Future<Output = Result<HashMap<Location, Vec<u8, Global>, RandomState>, MrBundleError>>
Resolve all resources, but with fully owned references
sourcepub fn bundled_resources(&self) -> &BTreeMap<PathBuf, Vec<u8, Global>, Global>
pub fn bundled_resources(&self) -> &BTreeMap<PathBuf, Vec<u8, Global>, Global>
Access the map of resources included in this bundle
Bundled resources are also accessible via resolve
or resolve_all
,
but using this method prevents a Clone
sourcepub fn encode(&self) -> Result<Vec<u8, Global>, MrBundleError>
pub fn encode(&self) -> Result<Vec<u8, Global>, MrBundleError>
An arbitrary and opaque encoding of the bundle data into a byte array
sourcepub fn find_root_dir(&self, path: &Path) -> Result<PathBuf, MrBundleError>
pub fn find_root_dir(&self, path: &Path) -> Result<PathBuf, MrBundleError>
Given that the Manifest is located at the given absolute path
, find
the absolute root directory for the “unpacked” Bundle directory.
Useful when “imploding” a directory into a bundle to determine the
default location of the generated Bundle file.
This will only be different than the Manifest path itself if the Manifest::path impl specifies a nested path.
Will return None if the path
does not actually end with the
manifest relative path, meaning that either the manifest file is
misplaced within the unpacked directory, or an incorrect path was
supplied.
sourcepub async fn unpack_yaml(
&self,
base_path: &Path,
force: bool
) -> impl Future<Output = Result<(), MrBundleError>>
pub async fn unpack_yaml(
&self,
base_path: &Path,
force: bool
) -> impl Future<Output = Result<(), MrBundleError>>
Create a directory which contains the manifest as a YAML file,
and each resource written to its own file (as raw bytes)
The paths of the resources are specified by the paths of the bundle,
and the path of the manifest file is specified by the Manifest::path
trait method implementation of the M
type.
Trait Implementations
sourceimpl AsRef<Bundle<CoordinatorManifest>> for CoordinatorBundle
impl AsRef<Bundle<CoordinatorManifest>> for CoordinatorBundle
sourcefn as_ref(&self) -> &Bundle<CoordinatorManifest>
fn as_ref(&self) -> &Bundle<CoordinatorManifest>
sourceimpl Borrow<Bundle<CoordinatorManifest>> for CoordinatorBundle
impl Borrow<Bundle<CoordinatorManifest>> for CoordinatorBundle
sourcefn borrow(&self) -> &Bundle<CoordinatorManifest>
fn borrow(&self) -> &Bundle<CoordinatorManifest>
sourceimpl Debug for CoordinatorBundle
impl Debug for CoordinatorBundle
sourceimpl Deref for CoordinatorBundle
impl Deref for CoordinatorBundle
type Target = Bundle<CoordinatorManifest>
type Target = Bundle<CoordinatorManifest>
sourcefn deref(&self) -> &<CoordinatorBundle as Deref>::Target
fn deref(&self) -> &<CoordinatorBundle as Deref>::Target
sourceimpl<'de> Deserialize<'de> for CoordinatorBundle
impl<'de> Deserialize<'de> for CoordinatorBundle
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<CoordinatorBundle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<CoordinatorBundle, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
sourceimpl From<Bundle<CoordinatorManifest>> for CoordinatorBundle
impl From<Bundle<CoordinatorManifest>> for CoordinatorBundle
sourcefn from(original: Bundle<CoordinatorManifest>) -> CoordinatorBundle
fn from(original: Bundle<CoordinatorManifest>) -> CoordinatorBundle
sourceimpl PartialEq<CoordinatorBundle> for CoordinatorBundle
impl PartialEq<CoordinatorBundle> for CoordinatorBundle
sourcefn eq(&self, other: &CoordinatorBundle) -> bool
fn eq(&self, other: &CoordinatorBundle) -> bool
sourceimpl Serialize for CoordinatorBundle
impl Serialize for CoordinatorBundle
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
sourceimpl TryFrom<&CoordinatorBundle> for SerializedBytes
impl TryFrom<&CoordinatorBundle> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
sourcefn try_from(
t: &CoordinatorBundle
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: &CoordinatorBundle
) -> Result<SerializedBytes, SerializedBytesError>
sourceimpl TryFrom<CoordinatorBundle> for SerializedBytes
impl TryFrom<CoordinatorBundle> for SerializedBytes
type Error = SerializedBytesError
type Error = SerializedBytesError
sourcefn try_from(
t: CoordinatorBundle
) -> Result<SerializedBytes, SerializedBytesError>
fn try_from(
t: CoordinatorBundle
) -> Result<SerializedBytes, SerializedBytesError>
sourceimpl TryFrom<SerializedBytes> for CoordinatorBundle
impl TryFrom<SerializedBytes> for CoordinatorBundle
type Error = SerializedBytesError
type Error = SerializedBytesError
sourcefn try_from(
sb: SerializedBytes
) -> Result<CoordinatorBundle, SerializedBytesError>
fn try_from(
sb: SerializedBytes
) -> Result<CoordinatorBundle, SerializedBytesError>
impl Eq for CoordinatorBundle
impl StructuralEq for CoordinatorBundle
impl StructuralPartialEq for CoordinatorBundle
Auto Trait Implementations
impl RefUnwindSafe for CoordinatorBundle
impl Send for CoordinatorBundle
impl Sync for CoordinatorBundle
impl Unpin for CoordinatorBundle
impl UnwindSafe for CoordinatorBundle
Blanket Implementations
impl<T> Any for Twhere
T: Any + ?Sized,
impl<T> Any for Twhere
T: Any + ?Sized,
fn type_id_compat(&self) -> TypeId
fn type_id_compat(&self) -> TypeId
impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.impl<T> FutureExt for T
impl<T> FutureExt for T
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<T> Pointable for T
impl<T> Pointable for T
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
impl<T> Upcastable for Twhere
T: 'static + Any + Send + Sync,
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T>where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;