pub struct ConnectionField {
pub name: String,
pub description: String,
pub required: bool,
pub secret: bool,
pub default: Option<Value>,
pub same_as_source: Option<String>,
pub manual: bool,
pub kind: Option<FieldKind>,
pub choices: Vec<String>,
}Fields§
§name: String§description: String§required: bool§secret: boolOffered as an env_var() reference by default in dre init.
default: Option<Value>§same_as_source: Option<String>A source type whose profile has the same field: dre init offers the value entered for
that source as this field’s default (e.g. one Databricks host for source and destination).
manual: boolSet by hand in profiles.yml: dre init doesn’t ask for it. For alternatives to a
prompted field (a key given as text instead of a file) and nested blocks (ssh:).
kind: Option<FieldKind>What the value must be, checked by validate_connection (and dre init as you type).
choices: Vec<String>The only values it may take (dre init offers them as a choice).
Implementations§
Source§impl ConnectionField
impl ConnectionField
pub fn new(name: &str, description: &str) -> Self
pub fn kind(self, kind: FieldKind) -> Self
pub fn choices(self, choices: &[&str]) -> Self
pub fn required(self) -> Self
pub fn secret(self) -> Self
pub fn default(self, v: impl Into<Value>) -> Self
pub fn same_as_source(self, source_type: &str) -> Self
pub fn manual(self) -> Self
Trait Implementations§
Source§impl Clone for ConnectionField
impl Clone for ConnectionField
Source§impl Debug for ConnectionField
impl Debug for ConnectionField
Source§impl<'de> Deserialize<'de> for ConnectionField
impl<'de> Deserialize<'de> for ConnectionField
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ConnectionField
impl PartialEq for ConnectionField
Source§impl Serialize for ConnectionField
impl Serialize for ConnectionField
impl StructuralPartialEq for ConnectionField
Auto Trait Implementations§
impl Freeze for ConnectionField
impl RefUnwindSafe for ConnectionField
impl Send for ConnectionField
impl Sync for ConnectionField
impl Unpin for ConnectionField
impl UnsafeUnpin for ConnectionField
impl UnwindSafe for ConnectionField
Blanket Implementations§
impl<T> Allocation for T
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