Struct cln_plugin::ConfiguredPlugin
source · pub struct ConfiguredPlugin<S, I, O>where
S: Clone + Send,{ /* private fields */ }Expand description
A plugin that has registered with the lightning daemon, and gotten
its options filled, however has not yet acknowledged the init
message. This is a mid-state allowing a plugin to disable itself,
based on the options.
Implementations§
source§impl<S, I, O> ConfiguredPlugin<S, I, O>where
S: Send + Clone + Sync + 'static,
I: AsyncRead + Send + Unpin + 'static,
O: Send + AsyncWrite + Unpin + 'static,
impl<S, I, O> ConfiguredPlugin<S, I, O>where S: Send + Clone + Sync + 'static, I: AsyncRead + Send + Unpin + 'static, O: Send + AsyncWrite + Unpin + 'static,
pub async fn start(self, state: S) -> Result<Plugin<S>, Error>
sourcepub async fn disable(self, reason: &str) -> Result<(), Error>
pub async fn disable(self, reason: &str) -> Result<(), Error>
Abort the plugin startup. Communicate that we’re about to exit voluntarily, and this is not an error.
pub fn option(&self, name: &str) -> Option<Value>
sourcepub fn configuration(&self) -> Configuration
pub fn configuration(&self) -> Configuration
return the cln configuration send to the plugin after the initialization.
Auto Trait Implementations§
impl<S, I, O> !RefUnwindSafe for ConfiguredPlugin<S, I, O>
impl<S, I, O> Send for ConfiguredPlugin<S, I, O>where I: Send, O: Send,
impl<S, I, O> Sync for ConfiguredPlugin<S, I, O>where I: Sync, O: Send,
impl<S, I, O> Unpin for ConfiguredPlugin<S, I, O>where I: Unpin,
impl<S, I, O> !UnwindSafe for ConfiguredPlugin<S, I, O>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more