pub struct DatasourceDecl {
pub name: Ident,
pub fields: Vec<ConfigField>,
pub span: Span,
}Expand description
A datasource block declaration.
§Example
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}Fields§
§name: IdentThe name of the datasource (e.g., “db”).
fields: Vec<ConfigField>Configuration fields (key-value pairs).
span: SpanSpan covering the entire datasource block.
Implementations§
Source§impl DatasourceDecl
impl DatasourceDecl
Sourcepub fn find_field(&self, name: &str) -> Option<&ConfigField>
pub fn find_field(&self, name: &str) -> Option<&ConfigField>
Finds a configuration field by name.
Trait Implementations§
Source§impl Clone for DatasourceDecl
impl Clone for DatasourceDecl
Source§fn clone(&self) -> DatasourceDecl
fn clone(&self) -> DatasourceDecl
Returns a duplicate of the value. Read more
1.0.0 · 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 DatasourceDecl
impl Debug for DatasourceDecl
Source§impl PartialEq for DatasourceDecl
impl PartialEq for DatasourceDecl
impl StructuralPartialEq for DatasourceDecl
Auto Trait Implementations§
impl Freeze for DatasourceDecl
impl RefUnwindSafe for DatasourceDecl
impl Send for DatasourceDecl
impl Sync for DatasourceDecl
impl Unpin for DatasourceDecl
impl UnsafeUnpin for DatasourceDecl
impl UnwindSafe for DatasourceDecl
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