[−][src]Struct splinter::service::scabbard::Scabbard
A service for running Sawtooth Sabre smart contracts with two-phase commit consensus.
Methods
impl Scabbard
[src]
pub fn new(
service_id: String,
circuit_id: &str,
peer_services: HashSet<String>,
state_db_dir: &Path,
state_db_size: usize,
receipt_db_dir: &Path,
receipt_db_size: usize,
signature_verifier: Box<dyn SignatureVerifier>,
admin_keys: Vec<String>,
coordinator_timeout: Option<Duration>
) -> Result<Self, ScabbardError>
[src]
service_id: String,
circuit_id: &str,
peer_services: HashSet<String>,
state_db_dir: &Path,
state_db_size: usize,
receipt_db_dir: &Path,
receipt_db_size: usize,
signature_verifier: Box<dyn SignatureVerifier>,
admin_keys: Vec<String>,
coordinator_timeout: Option<Duration>
) -> Result<Self, ScabbardError>
Generate a new Scabbard service.
pub fn get_state_at_address(
&self,
address: &str
) -> Result<Option<Vec<u8>>, ScabbardError>
[src]
&self,
address: &str
) -> Result<Option<Vec<u8>>, ScabbardError>
pub fn get_state_with_prefix(
&self,
prefix: Option<&str>
) -> Result<Box<dyn Iterator<Item = Result<(String, Vec<u8>), ScabbardStateError>>>, ScabbardError>
[src]
&self,
prefix: Option<&str>
) -> Result<Box<dyn Iterator<Item = Result<(String, Vec<u8>), ScabbardStateError>>>, ScabbardError>
pub fn add_batches(
&self,
batches: Vec<BatchPair>
) -> Result<Option<BatchListPath>, ScabbardError>
[src]
&self,
batches: Vec<BatchPair>
) -> Result<Option<BatchListPath>, ScabbardError>
pub fn get_batch_info(
&self,
ids: HashSet<String>,
wait: Option<Duration>
) -> Result<BatchInfoIter, ScabbardError>
[src]
&self,
ids: HashSet<String>,
wait: Option<Duration>
) -> Result<BatchInfoIter, ScabbardError>
Get the BatchInfo
for each specified batch.
Arguments
ids
: List of batch IDs to get info onwait
: IfSome
, wait up to the given time for all requested batches to complete (statuses will be eitherCommitted
orInvalid
); if the timeout expires, anErr
result will be given by the returned iterator. IfNone
, return theBatchInfo
s to complete.
pub fn get_events_since(
&self,
event_id: Option<String>
) -> Result<Events, ScabbardError>
[src]
&self,
event_id: Option<String>
) -> Result<Events, ScabbardError>
pub fn add_state_subscriber(
&self,
subscriber: Box<dyn StateSubscriber>
) -> Result<(), ScabbardError>
[src]
&self,
subscriber: Box<dyn StateSubscriber>
) -> Result<(), ScabbardError>
Trait Implementations
impl Clone for Scabbard
[src]
impl Service for Scabbard
[src]
fn service_id(&self) -> &str
[src]
fn service_type(&self) -> &str
[src]
fn start(
&mut self,
service_registry: &dyn ServiceNetworkRegistry
) -> Result<(), ServiceStartError>
[src]
&mut self,
service_registry: &dyn ServiceNetworkRegistry
) -> Result<(), ServiceStartError>
fn stop(
&mut self,
service_registry: &dyn ServiceNetworkRegistry
) -> Result<(), ServiceStopError>
[src]
&mut self,
service_registry: &dyn ServiceNetworkRegistry
) -> Result<(), ServiceStopError>
fn destroy(self: Box<Self>) -> Result<(), ServiceDestroyError>
[src]
fn handle_message(
&self,
message_bytes: &[u8],
_message_context: &ServiceMessageContext
) -> Result<(), ServiceError>
[src]
&self,
message_bytes: &[u8],
_message_context: &ServiceMessageContext
) -> Result<(), ServiceError>
fn as_any(&self) -> &dyn Any
[src]
Auto Trait Implementations
impl RefUnwindSafe for Scabbard
impl Send for Scabbard
impl Sync for Scabbard
impl Unpin for Scabbard
impl UnwindSafe for Scabbard
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Clone + Send + Sync,
T: 'a + Clone + Send + Sync,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
&'a Self: AsExpression<T>,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a>
fn self_address_mut(&mut self) -> *mut ()
impl<T> SafeBorrow<T> for T where
T: ?Sized,
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,