Struct sp_inherents::InherentDataProviders [−][src]
pub struct InherentDataProviders { /* fields omitted */ }All InherentData providers.
Implementations
impl InherentDataProviders[src]
impl InherentDataProviders[src]pub fn new() -> Self[src]
Create a new instance.
pub fn register_provider<P: ProvideInherentData + Send + Sync + 'static>(
    &self, 
    provider: P
) -> Result<(), Error>[src]
&self,
provider: P
) -> Result<(), Error>
Register an InherentData provider.
The registration order is preserved and this order will also be used when creating the inherent data.
Result
Will return an error, if a provider with the same identifier already exists.
pub fn has_provider(&self, identifier: &InherentIdentifier) -> bool[src]
Returns if a provider for the given identifier exists.
pub fn create_inherent_data(&self) -> Result<InherentData, Error>[src]
Create inherent data.
pub fn error_to_string(
    &self, 
    identifier: &InherentIdentifier, 
    error: &[u8]
) -> String[src]
&self,
identifier: &InherentIdentifier,
error: &[u8]
) -> String
Converts a given encoded error into a String.
Useful if the implementation encounters an error for an identifier it does not know.
Trait Implementations
impl Clone for InherentDataProviders[src]
impl Clone for InherentDataProviders[src]fn clone(&self) -> InherentDataProviders[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Default for InherentDataProviders[src]
impl Default for InherentDataProviders[src]