Struct cln_plugin::ConfiguredPlugin
source · 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.