[−][src]Struct sawtooth_sdk::consensus::zmq_service::ZmqService
Methods
impl ZmqService
[src]
pub fn new(sender: ZmqMessageSender, timeout: Duration) -> Self
[src]
pub fn rpc<I: Message, O: Message>(
&mut self,
request: &I,
request_type: Message_MessageType,
response_type: Message_MessageType
) -> Result<O, Error>
[src]
&mut self,
request: &I,
request_type: Message_MessageType,
response_type: Message_MessageType
) -> Result<O, Error>
Serialize and send a request, wait for the default timeout, and receive and parse an expected response.
Trait Implementations
impl Service for ZmqService
[src]
fn send_to(
&mut self,
peer: &PeerId,
message_type: &str,
payload: Vec<u8>
) -> Result<(), Error>
[src]
&mut self,
peer: &PeerId,
message_type: &str,
payload: Vec<u8>
) -> Result<(), Error>
fn broadcast(
&mut self,
message_type: &str,
payload: Vec<u8>
) -> Result<(), Error>
[src]
&mut self,
message_type: &str,
payload: Vec<u8>
) -> Result<(), Error>
fn initialize_block(
&mut self,
previous_id: Option<BlockId>
) -> Result<(), Error>
[src]
&mut self,
previous_id: Option<BlockId>
) -> Result<(), Error>
fn summarize_block(&mut self) -> Result<Vec<u8>, Error>
[src]
fn finalize_block(&mut self, data: Vec<u8>) -> Result<BlockId, Error>
[src]
fn cancel_block(&mut self) -> Result<(), Error>
[src]
fn check_blocks(&mut self, priority: Vec<BlockId>) -> Result<(), Error>
[src]
fn commit_block(&mut self, block_id: BlockId) -> Result<(), Error>
[src]
fn ignore_block(&mut self, block_id: BlockId) -> Result<(), Error>
[src]
fn fail_block(&mut self, block_id: BlockId) -> Result<(), Error>
[src]
fn get_blocks(
&mut self,
block_ids: Vec<BlockId>
) -> Result<HashMap<BlockId, Block>, Error>
[src]
&mut self,
block_ids: Vec<BlockId>
) -> Result<HashMap<BlockId, Block>, Error>
fn get_chain_head(&mut self) -> Result<Block, Error>
[src]
fn get_settings(
&mut self,
block_id: BlockId,
keys: Vec<String>
) -> Result<HashMap<String, String>, Error>
[src]
&mut self,
block_id: BlockId,
keys: Vec<String>
) -> Result<HashMap<String, String>, Error>
fn get_state(
&mut self,
block_id: BlockId,
addresses: Vec<String>
) -> Result<HashMap<String, Vec<u8>>, Error>
[src]
&mut self,
block_id: BlockId,
addresses: Vec<String>
) -> Result<HashMap<String, Vec<u8>>, Error>
Auto Trait Implementations
impl Send for ZmqService
impl Sync for ZmqService
impl Unpin for ZmqService
impl UnwindSafe for ZmqService
impl RefUnwindSafe for ZmqService
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for 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<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<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,