pub struct SourceChainWorkspace { /* private fields */ }
Implementations§
source§impl SourceChainWorkspace
impl SourceChainWorkspace
pub async fn new( authored: DbWrite<DbKindAuthored>, dht: DbWrite<DbKindDht>, dht_db_cache: DhtDbQueryCache, cache: DbWrite<DbKindCache>, keystore: MetaLairClient, author: AgentPubKey, dna_def: Arc<DnaDef> ) -> SourceChainResult<Self>
sourcepub async fn init_as_root(
authored: DbWrite<DbKindAuthored>,
dht: DbWrite<DbKindDht>,
dht_db_cache: DhtDbQueryCache,
cache: DbWrite<DbKindCache>,
keystore: MetaLairClient,
author: AgentPubKey,
dna_def: Arc<DnaDef>
) -> SourceChainResult<Self>
pub async fn init_as_root( authored: DbWrite<DbKindAuthored>, dht: DbWrite<DbKindDht>, dht_db_cache: DhtDbQueryCache, cache: DbWrite<DbKindCache>, keystore: MetaLairClient, author: AgentPubKey, dna_def: Arc<DnaDef> ) -> SourceChainResult<Self>
Create a source chain workspace where the root caller is the init callback.
sourcepub async fn raw_empty(
authored: DbWrite<DbKindAuthored>,
dht: DbWrite<DbKindDht>,
dht_db_cache: DhtDbQueryCache,
cache: DbWrite<DbKindCache>,
keystore: MetaLairClient,
author: AgentPubKey,
dna_def: Arc<DnaDef>
) -> SourceChainResult<Self>
pub async fn raw_empty( authored: DbWrite<DbKindAuthored>, dht: DbWrite<DbKindDht>, dht_db_cache: DhtDbQueryCache, cache: DbWrite<DbKindCache>, keystore: MetaLairClient, author: AgentPubKey, dna_def: Arc<DnaDef> ) -> SourceChainResult<Self>
Create a source chain with a blank chain head. You probably don’t want this. This type is only useful for when a source chain really needs to be constructed before genesis runs.
sourcepub fn called_from_init(&self) -> bool
pub fn called_from_init(&self) -> bool
Did this zome call chain originate from within an init callback.
source§impl SourceChainWorkspace
impl SourceChainWorkspace
pub fn source_chain(&self) -> &SourceChain
Methods from Deref<Target = HostFnWorkspace>§
pub fn source_chain( &self ) -> &Option<SourceChain<SourceChainDb, SourceChainDht>>
pub fn stores(&self) -> HostFnStores
pub fn databases( &self ) -> (DbRead<DbKindAuthored>, DbRead<DbKindDht>, DbWrite<DbKindCache>)
Trait Implementations§
source§impl AsRef<HostFnWorkspace> for SourceChainWorkspace
impl AsRef<HostFnWorkspace> for SourceChainWorkspace
source§fn as_ref(&self) -> &HostFnWorkspace
fn as_ref(&self) -> &HostFnWorkspace
Converts this type into a shared reference of the (usually inferred) input type.
source§impl Borrow<HostFnWorkspace> for SourceChainWorkspace
impl Borrow<HostFnWorkspace> for SourceChainWorkspace
source§fn borrow(&self) -> &HostFnWorkspace
fn borrow(&self) -> &HostFnWorkspace
Immutably borrows from an owned value. Read more
source§impl Clone for SourceChainWorkspace
impl Clone for SourceChainWorkspace
source§fn clone(&self) -> SourceChainWorkspace
fn clone(&self) -> SourceChainWorkspace
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Deref for SourceChainWorkspace
impl Deref for SourceChainWorkspace
source§impl From<SourceChainWorkspace> for HostFnWorkspace
impl From<SourceChainWorkspace> for HostFnWorkspace
source§fn from(workspace: SourceChainWorkspace) -> Self
fn from(workspace: SourceChainWorkspace) -> Self
Converts to this type from the input type.
source§impl From<SourceChainWorkspace> for HostFnWorkspaceRead
impl From<SourceChainWorkspace> for HostFnWorkspaceRead
source§fn from(workspace: SourceChainWorkspace) -> Self
fn from(workspace: SourceChainWorkspace) -> Self
Converts to this type from the input type.
source§impl TryFrom<HostFnWorkspace> for SourceChainWorkspace
impl TryFrom<HostFnWorkspace> for SourceChainWorkspace
§type Error = SourceChainError
type Error = SourceChainError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl !RefUnwindSafe for SourceChainWorkspace
impl Send for SourceChainWorkspace
impl Sync for SourceChainWorkspace
impl Unpin for SourceChainWorkspace
impl !UnwindSafe for SourceChainWorkspace
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.source§impl<T> Upcastable for T
impl<T> Upcastable for T
source§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
source§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref