Struct openethereum::rpc_apis::SignerService
source · [−]pub struct SignerService {
is_enabled: bool,
queue: Arc<ConfirmationsQueue>,
generate_new_token: Box<dyn Fn() + Send + Sync + 'static, Global>,
}
Expand description
Manages communication with Signer crate
Fields
is_enabled: bool
queue: Arc<ConfirmationsQueue>
generate_new_token: Box<dyn Fn() + Send + Sync + 'static, Global>
Implementations
sourceimpl SignerService
impl SignerService
sourcepub fn new<F>(new_token: F, is_enabled: bool) -> SignerService where
F: 'static + Fn() -> Result<String, String> + Send + Sync,
pub fn new<F>(new_token: F, is_enabled: bool) -> SignerService where
F: 'static + Fn() -> Result<String, String> + Send + Sync,
Creates new Signer Service given function to generate new tokens.
sourcepub fn generate_token(&self) -> Result<String, String>
pub fn generate_token(&self) -> Result<String, String>
Generates new signer authorization token.
sourcepub fn queue(&self) -> Arc<ConfirmationsQueue>
pub fn queue(&self) -> Arc<ConfirmationsQueue>
Returns a reference to ConfirmationsQueue
sourcepub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Returns true if Signer is enabled.
Methods from Deref<Target = ConfirmationsQueue>
Trait Implementations
sourceimpl Deref for SignerService
impl Deref for SignerService
type Target = ConfirmationsQueue
type Target = ConfirmationsQueue
The resulting type after dereferencing.
sourcepub fn deref(&self) -> &<SignerService as Deref>::Target
pub fn deref(&self) -> &<SignerService as Deref>::Target
Dereferences the value.
Auto Trait Implementations
impl !RefUnwindSafe for SignerService
impl Send for SignerService
impl Sync for SignerService
impl Unpin for SignerService
impl !UnwindSafe for SignerService
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more