pub struct SourceConfig { /* private fields */ }Expand description
One named source, as a document configures it.
Built by Config::from_document, never deserialized directly: plugin is a
PluginKind rather than the string the document spelled, so a source naming a
plugin this build does not have cannot be represented here at all.
Implementations§
Source§impl SourceConfig
impl SourceConfig
Sourcepub fn plugin(&self) -> PluginKind
pub fn plugin(&self) -> PluginKind
The plugin kind that builds this source.
Sourcepub fn config(&self) -> &Value
pub fn config(&self) -> &Value
The plugin’s own block.
Opaque here on purpose — a plugin’s fields are the plugin’s, and typing them in
the engine would put every plugin’s shape in the engine. What holds instead is
that Config::from_document checks each block against the schema its own
plugin declares, and this field is not public, so no SourceConfig anybody can
reach carries a block that plugin would refuse.
Trait Implementations§
Source§impl Clone for SourceConfig
impl Clone for SourceConfig
Source§fn clone(&self) -> SourceConfig
fn clone(&self) -> SourceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceConfig
impl Debug for SourceConfig
Source§impl PartialEq for SourceConfig
impl PartialEq for SourceConfig
impl StructuralPartialEq for SourceConfig
Auto Trait Implementations§
impl Freeze for SourceConfig
impl RefUnwindSafe for SourceConfig
impl Send for SourceConfig
impl Sync for SourceConfig
impl Unpin for SourceConfig
impl UnsafeUnpin for SourceConfig
impl UnwindSafe for SourceConfig
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