pub struct Essential<S>{ /* private fields */ }
Implementations§
Source§impl<S> Essential<S>
impl<S> Essential<S>
pub fn new( storage: S, config: Arc<CheckPredicateConfig>, time_config: Arc<TimeConfig>, ) -> Self
pub fn spawn(self, config: Config) -> Result<Handle>
pub async fn run( &self, shutdown: Shutdown, run_loop_interval: Duration, ) -> Result<()>
pub async fn deploy_contract( &self, contract: SignedContract, ) -> Result<ContentAddress>
pub async fn check_solution( &self, solution: Solution, ) -> Result<CheckSolutionOutput>
pub async fn check_solution_with_contracts( &self, solution: Solution, contracts: Vec<Contract>, ) -> Result<CheckSolutionOutput>
pub async fn submit_solution( &self, solution: Solution, ) -> Result<ContentAddress>
pub async fn solution_outcome( &self, solution_hash: &Hash, ) -> Result<Vec<SolutionOutcome>>
pub async fn get_predicate( &self, address: &PredicateAddress, ) -> Result<Option<Predicate>>
pub async fn get_contract( &self, address: &ContentAddress, ) -> Result<Option<SignedContract>>
pub async fn list_contracts( &self, time_range: Option<Range<Duration>>, page: Option<usize>, ) -> Result<Vec<Contract>>
pub fn subscribe_contracts( &self, start_time: Option<Duration>, start_page: Option<usize>, ) -> impl Stream<Item = Result<Contract>> + Send + 'static
pub async fn list_solutions_pool( &self, page: Option<usize>, ) -> Result<Vec<Solution>>
pub async fn list_blocks( &self, time_range: Option<Range<Duration>>, block_number: Option<u64>, page: Option<usize>, ) -> Result<Vec<Block>>
pub fn subscribe_blocks( &self, start_time: Option<Duration>, start_number: Option<u64>, start_page: Option<usize>, ) -> impl Stream<Item = Result<Block>> + Send + 'static
pub async fn query_state( &self, address: &ContentAddress, key: &Key, ) -> Result<Vec<Word>>
pub async fn query_state_reads( &self, query: QueryStateReads, ) -> Result<QueryStateReadsOutput>
Trait Implementations§
Auto Trait Implementations§
impl<S> Freeze for Essential<S>where
S: Freeze,
impl<S> RefUnwindSafe for Essential<S>where
S: RefUnwindSafe,
impl<S> Send for Essential<S>where
S: Send,
impl<S> Sync for Essential<S>where
S: Sync,
impl<S> Unpin for Essential<S>where
S: Unpin,
impl<S> UnwindSafe for Essential<S>where
S: 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,
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