[−][src]Struct exonum_rust_runtime::Broadcaster
Transaction broadcaster.
Transaction broadcast allows a service to create transactions in the after_commit
handler or the HTTP API handlers and broadcast them to the connected Exonum nodes.
The transactions are addressed to the executing service instance and are signed
by the service keypair of the node.
Broadcasting functionality is primarily useful for services that receive information from outside the blockchain and need to translate it to transactions. As an example, a time oracle service may broadcast local node time and build the blockchain-wide time by processing corresponding transactions.
Methods
impl<'a> Broadcaster<'a>
[src]
pub fn into_owned(self) -> Broadcaster<'static>
[src]
Converts the broadcaster into the owned representation, which can be used to broadcast transactions asynchronously.
Trait Implementations
impl<'a> Clone for Broadcaster<'a>
[src]
fn clone(&self) -> Broadcaster<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for Broadcaster<'a>
[src]
impl<'_> GenericCall<()> for Broadcaster<'_>
[src]
Signs and broadcasts a transaction to the other nodes in the network.
The transaction is signed by the service keypair of the node. The same input transaction
will lead to the identical transaction being broadcast. If this is undesired, add a nonce
field to the input transaction (e.g., a u64
) and change it between the calls.
Return value
Returns the hash of the created transaction, or an error if the transaction cannot be broadcast. An error means that the node is being shut down.
type Output = Result<Hash, SendError>
Type of values output by the stub.
fn generic_call(
&self,
_ctx: (),
method: MethodDescriptor,
args: Vec<u8>
) -> Self::Output
[src]
&self,
_ctx: (),
method: MethodDescriptor,
args: Vec<u8>
) -> Self::Output
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Broadcaster<'a>
impl<'a> Send for Broadcaster<'a>
impl<'a> Sync for Broadcaster<'a>
impl<'a> Unpin for Broadcaster<'a>
impl<'a> !UnwindSafe for Broadcaster<'a>
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<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,