[−][src]Struct holochain_core::instance::Instance
Object representing a Holochain instance, i.e. a running holochain (DNA + DHT + source-chain) Holds the Event loop and processes it with the redux pattern.
Methods
impl Instance[src]
impl Instancepub fn default_channel_buffer_size() -> usize[src]
pub fn default_channel_buffer_size() -> usizepub fn action_channel(&self) -> SyncSender<ActionWrapper>[src]
pub fn action_channel(&self) -> SyncSender<ActionWrapper>get a clone of the action channel
pub fn observer_channel(&self) -> SyncSender<Observer>[src]
pub fn observer_channel(&self) -> SyncSender<Observer>get a clone of the observer channel
pub fn dispatch(&mut self, action_wrapper: ActionWrapper)[src]
pub fn dispatch(&mut self, action_wrapper: ActionWrapper)pub fn dispatch_and_wait(&mut self, action_wrapper: ActionWrapper)[src]
pub fn dispatch_and_wait(&mut self, action_wrapper: ActionWrapper)Stack an Action in the Event Queue and block until is has been processed.
Panics
Panics if called before start_action_loop.
pub fn dispatch_with_observer<F>(
&mut self,
action_wrapper: ActionWrapper,
closure: F
) where
F: 'static + FnMut(&State) -> bool + Send, [src]
pub fn dispatch_with_observer<F>(
&mut self,
action_wrapper: ActionWrapper,
closure: F
) where
F: 'static + FnMut(&State) -> bool + Send, Stack an action in the Event Queue and create an Observer on it with the specified closure
Panics
Panics if called before start_action_loop.
pub fn initialize_context(&self, context: Arc<Context>) -> Arc<Context>[src]
pub fn initialize_context(&self, context: Arc<Context>) -> Arc<Context>pub fn start_action_loop(&mut self, context: Arc<Context>)[src]
pub fn start_action_loop(&mut self, context: Arc<Context>)Start the Event Loop on a seperate thread
pub fn new(context: Arc<Context>) -> Self[src]
pub fn new(context: Arc<Context>) -> SelfCreates a new Instance with disconnected channels.
pub fn from_state(state: State) -> Self[src]
pub fn from_state(state: State) -> Selfpub fn state(&self) -> RwLockReadGuard<State>[src]
pub fn state(&self) -> RwLockReadGuard<State>Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T> From for T[src]
impl<T> From for Timpl<T, U> Into for T where
U: From<T>, [src]
impl<T, U> Into for T where
U: From<T>, impl<T> ToOwned for T where
T: Clone, [src]
impl<T> ToOwned for T where
T: Clone, type Owned = T
fn to_owned(&self) -> T[src]
fn to_owned(&self) -> TCreates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)[src]
fn clone_into(&self, target: &mut T)🔬 This is a nightly-only experimental API. (toowned_clone_into)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>, [src]
impl<T, U> TryFrom for T where
T: From<U>, type Error = !
try_from)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>try_from)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized, [src]
impl<T> Borrow for T where
T: ?Sized, impl<T> Any for T where
T: 'static + ?Sized, [src]
impl<T> Any for T where
T: 'static + ?Sized, fn get_type_id(&self) -> TypeId[src]
fn get_type_id(&self) -> TypeId🔬 This is a nightly-only experimental API. (get_type_id)
this method will likely be replaced by an associated static
Gets the TypeId of self. Read more
impl<T> BorrowMut for T where
T: ?Sized, [src]
impl<T> BorrowMut for T where
T: ?Sized, fn borrow_mut(&mut self) -> &mut T[src]
fn borrow_mut(&mut self) -> &mut TMutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>, [src]
impl<T, U> TryInto for T where
U: TryFrom<T>, type Error = <U as TryFrom<T>>::Error
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>try_from)Performs the conversion.
impl<T> Same for T[src]
impl<T> Same for Ttype Output = T
Should always be Self
impl<T> ActorArgs for T where
T: Send + Sync + Clone, [src]
impl<T> ActorArgs for T where
T: Send + Sync + Clone,