pub struct BuildCtx<'a> { /* private fields */ }Expand description
Handed to a PluginFactory while constructing one instance.
Implementations§
Source§impl<'a> BuildCtx<'a>
impl<'a> BuildCtx<'a>
pub fn new( name: &'a str, config: &'a Map<String, Value>, meta: &'a PipelineMeta, stage: StageInfo<'a>, host: &'a mut dyn HostBuilder, ) -> Self
Sourcepub fn stage(&self) -> StageInfo<'a>
pub fn stage(&self) -> StageInfo<'a>
Where this instance sits in the pipeline. Cache anything derived from it as the position cannot change after construction.
pub fn name(&self) -> &str
pub fn meta(&self) -> &PipelineMeta
pub fn direction(&self) -> Direction
pub fn raw_config(&self) -> &Map<String, Value>
Sourcepub fn config<T: DeserializeOwned>(&self) -> Result<T>
pub fn config<T: DeserializeOwned>(&self) -> Result<T>
Deserialize the entry’s options into the plugin’s own config type.
Through Forgiving, so option keys and enum values are matched the
way every other identifier in tocat is: case-insensitively, with dashes
and underscores treated as noise. A plugin declares its config exactly
as it would otherwise, including deny_unknown_fields, and needs to
know nothing about this.
Sourcepub fn open_channel(&mut self, target: ChannelTarget) -> Result<ChannelId>
pub fn open_channel(&mut self, target: ChannelTarget) -> Result<ChannelId>
Reserve a side channel. Equal targets share one handle process-wide.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BuildCtx<'a>
impl<'a> !Send for BuildCtx<'a>
impl<'a> !Sync for BuildCtx<'a>
impl<'a> !UnwindSafe for BuildCtx<'a>
impl<'a> Freeze for BuildCtx<'a>
impl<'a> Unpin for BuildCtx<'a>
impl<'a> UnsafeUnpin for BuildCtx<'a>
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