[−][src]Struct exonum_time::TimeService
Define the service.
Methods
impl TimeService
[src]
pub fn new() -> TimeService
[src]
Create a new TimeService
.
pub fn with_provider<T: Into<Box<dyn TimeProvider>>>(
time_provider: T
) -> TimeService
[src]
time_provider: T
) -> TimeService
Create a new TimeService
with time provider T
.
Trait Implementations
impl Default for TimeService
[src]
fn default() -> TimeService
[src]
impl Debug for TimeService
[src]
impl Service for TimeService
[src]
fn service_id(&self) -> u16
[src]
fn service_name(&self) -> &str
[src]
fn state_hash(&self, snapshot: &dyn Snapshot) -> Vec<Hash>
[src]
fn tx_from_raw(
&self,
raw: RawTransaction
) -> Result<Box<dyn Transaction>, Error>
[src]
&self,
raw: RawTransaction
) -> Result<Box<dyn Transaction>, Error>
fn initialize(&self, _fork: &Fork) -> Value
[src]
fn after_commit(&self, context: &ServiceContext)
[src]
Creates transaction after commit of the block.
fn wire_api(&self, builder: &mut ServiceApiBuilder)
[src]
fn before_commit(&self, fork: &Fork)
[src]
A service execution. This method is invoked for each service after execution of all transactions in the block but before after_commit
handler. Read more
Auto Trait Implementations
impl Sync for TimeService
impl Send for TimeService
impl Unpin for TimeService
impl !RefUnwindSafe for TimeService
impl !UnwindSafe for TimeService
Blanket Implementations
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<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,