pub struct SourceDefinition {
pub name: String,
pub source_type: String,
pub access: SourceAccess,
pub settings: BTreeMap<String, Value>,
}Expand description
One [[source]] block.
Fields§
§name: StringStable name; used everywhere else in the config.
source_type: Stringtype field. Renamed because type is a reserved word in
Rust.
access: SourceAccessAccess mask — read or readwrite (default). Narrows
the source plugin’s declared capabilities; see
SourceAccess.
settings: BTreeMap<String, Value>Any additional fields the source plugin understands
(account, addr, mount, file, …). Stored verbatim;
the router does not inspect them.
Implementations§
Source§impl SourceDefinition
impl SourceDefinition
Sourcepub fn effective_capabilities(&self, declared: Capabilities) -> Capabilities
pub fn effective_capabilities(&self, declared: Capabilities) -> Capabilities
The capability set the router / UI should honour for
this source — the plugin’s declared set narrowed by
the configured SourceAccess.
Trait Implementations§
Source§impl Clone for SourceDefinition
impl Clone for SourceDefinition
Source§fn clone(&self) -> SourceDefinition
fn clone(&self) -> SourceDefinition
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 SourceDefinition
impl Debug for SourceDefinition
Source§impl PartialEq for SourceDefinition
impl PartialEq for SourceDefinition
Source§fn eq(&self, other: &SourceDefinition) -> bool
fn eq(&self, other: &SourceDefinition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SourceDefinition
Auto Trait Implementations§
impl Freeze for SourceDefinition
impl RefUnwindSafe for SourceDefinition
impl Send for SourceDefinition
impl Sync for SourceDefinition
impl Unpin for SourceDefinition
impl UnsafeUnpin for SourceDefinition
impl UnwindSafe for SourceDefinition
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