Struct scabbard::service::ScabbardFactory[][src]

pub struct ScabbardFactory { /* fields omitted */ }

Implementations

impl ScabbardFactory[src]

pub fn new(
    state_db_dir: Option<String>,
    state_db_size: Option<usize>,
    receipt_db_dir: Option<String>,
    receipt_db_size: Option<usize>,
    signature_verifier_factory: Box<dyn VerifierFactory>
) -> Self
[src]

Trait Implementations

impl ServiceFactory for ScabbardFactory[src]

fn create(
    &self,
    service_id: String,
    _service_type: &str,
    circuit_id: &str,
    args: HashMap<String, String>
) -> Result<Box<dyn Service>, FactoryCreateError>
[src]

args must include the following:

  • admin_keys: list of public keys that are allowed to create and modify sabre contracts, formatted as a serialized JSON array of strings
  • peer_services: list of other scabbard services on the same circuit that this service will share state with

args may include the following optional entries:

  • coordinator_timeout: the length of time (in milliseconds) that the network has to commit a proposal before the coordinator rejects it (if not provided, default is 30 seconds)
  • version: the protocol version for scabbard (possible values: “1”, “2”) (default: “1”)

fn available_service_types(&self) -> &[String][src]

Return the available service types that this factory can create.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<P, N> IntoBytes<P> for N where
    P: Message + FromNative<N>, 
[src]

impl<P, N> IntoBytes<P> for N where
    P: Message + FromNative<N>, 
[src]

impl<N, P> IntoNative<N> for P where
    N: FromProto<P>, 
[src]

impl<N, P> IntoNative<N> for P where
    N: FromProto<P>, 
[src]

impl<N, P> IntoProto<P> for N where
    P: FromNative<N>, 
[src]

impl<N, P> IntoProto<P> for N where
    P: FromNative<N>, 
[src]

impl<T> SafeBorrow<T> for T where
    T: ?Sized

pub fn borrow_replacement(ptr: &T) -> &T

Given ptr, which was obtained from a prior call to Self::borrow(), return a value with the same nominal lifetime which is guaranteed to survive mutations to Self. Read more

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V