[−][src]Struct exonum_rust_runtime::api::ServiceApiState
Provide the current blockchain state snapshot to API handlers.
This structure allows a service API handler to interact with the service instance and other parts of the blockchain.
Methods
impl ServiceApiState
[src]
pub fn data(&self) -> BlockchainData<&dyn Snapshot>
[src]
Returns readonly access to blockchain data.
pub fn service_data(&self) -> Prefixed<&dyn Snapshot>
[src]
Returns readonly access to the data of the executing service.
pub fn snapshot(&self) -> &dyn Snapshot
[src]
Returns the access to the entire blockchain snapshot. Use data
or service_data
for more structure snapshot presentations.
pub fn service_key(&self) -> PublicKey
[src]
Returns the service key of this node.
pub fn instance(&self) -> &InstanceDescriptor
[src]
Returns information about the executing service.
pub fn status(&self) -> &InstanceStatus
[src]
Returns the current status of the service.
pub fn broadcaster(&self) -> Option<Broadcaster>
[src]
Returns a transaction broadcaster if the current node is a validator and the service
is active (i.e., can process transactions). If these conditions do not hold, returns None
.
pub fn generic_broadcaster(&self) -> Broadcaster
[src]
Returns a transaction broadcaster regardless of the node status (validator or auditor) and the service status (active or not).
Safety
Transactions for non-active services will not be broadcast successfully; they will be filtered on the receiving nodes as ones that cannot (currently) be processed.
pub fn moved_permanently(&self, new_endpoint: &str) -> MovedPermanentlyError
[src]
Creates a new builder for MovedPermanently
response.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for ServiceApiState
impl Send for ServiceApiState
impl Sync for ServiceApiState
impl Unpin for ServiceApiState
impl !UnwindSafe for ServiceApiState
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,