pub fn register_provider<P: ProvideInherentData + Send + Sync +'static>(
		&self,
		provider: P,
	) -> Result<(), RuntimeString> {
		if self.has_provider(&provider.inherent_identifier()) {
			Err(
				format!(
					"Inherent data provider with identifier {:?} already exists!",
					&provider.inherent_identifier()
				).into()
			)
		} else {
			provider.on_register(self)?;
			self.providers.write().push(Box::new(provider));
			Ok(())
		}
	}
/// 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.
Register an `InherentData` provider.
The registration order is preserved and this order will also be used when creating the
inherent data.
Register an ` InherentData ` provider . The registration order is preserved and this order will also be used when creating the inherent data .
pub fn register_provider<P: ProvideInherentData + Send + Sync +'static>(
		&self,
		provider: P,
	) -> Result<(), RuntimeString> {
		if self.has_provider(&provider.inherent_identifier()) {
			Err(
				format!(
					"Inherent data provider with identifier {:?} already exists!",
					&provider.inherent_identifier()
				).into()
			)
		} else {
			provider.on_register(self)?;
			self.providers.write().push(Box::new(provider));
			Ok(())
		}
	}
pub fn register_provider < P : ProvideInherentData + Send + Sync + ' static > ( & self , provider : P , ) -> Result < ( ) , RuntimeString > { if self . has_provider ( & provider . inherent_identifier ( ) ) { Err ( format ! ( " " provider inherent_identifier ( ) ) . into ( ) ) } else { provider . on_register ( self ) ? ; self . providers . write ( ) . push ( Box :: new ( provider ) ) ; Ok ( ( ) ) } }
Register an `InherentData` provider.
Register an ` InherentData ` provider .
&self
provider
P
&self
provider
P
result
Will return an error, if a provider with the same identifier already exists.
Will return an error if a provider with the same identifier already exists .