use super::{Comment, ConfigBlockProperty, Identifier, Span, WithDocumentation, WithIdentifier, WithSpan};
#[derive(Debug, Clone)]
pub struct SourceConfig {
pub name: Identifier,
pub properties: Vec<ConfigBlockProperty>,
pub(crate) documentation: Option<Comment>,
pub span: Span,
pub inner_span: Span,
}
impl WithIdentifier for SourceConfig {
fn identifier(&self) -> &Identifier {
&self.name
}
}
impl WithSpan for SourceConfig {
fn span(&self) -> Span {
self.span
}
}
impl WithDocumentation for SourceConfig {
fn documentation(&self) -> Option<&str> {
self.documentation.as_ref().map(|doc| doc.text.as_str())
}
}