#[non_exhaustive]pub struct SourceSpec {
pub encoding: String,
pub source: Option<Source>,
/* private fields */
}Expand description
Represents one path to the location that holds source data.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.encoding: StringOptional. The optional field to specify the encoding of the sql bytes.
source: Option<Source>The specific source SQL.
Implementations§
Source§impl SourceSpec
impl SourceSpec
pub fn new() -> Self
Sourcepub fn set_encoding<T: Into<String>>(self, v: T) -> Self
pub fn set_encoding<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
pub fn set_source<T: Into<Option<Source>>>(self, v: T) -> Self
Sourcepub fn base_uri(&self) -> Option<&String>
pub fn base_uri(&self) -> Option<&String>
The value of source
if it holds a BaseUri, None if the field is not set or
holds a different branch.
Sourcepub fn set_base_uri<T: Into<String>>(self, v: T) -> Self
pub fn set_base_uri<T: Into<String>>(self, v: T) -> Self
Sourcepub fn literal(&self) -> Option<&Box<Literal>>
pub fn literal(&self) -> Option<&Box<Literal>>
The value of source
if it holds a Literal, None if the field is not set or
holds a different branch.
Sourcepub fn set_literal<T: Into<Box<Literal>>>(self, v: T) -> Self
pub fn set_literal<T: Into<Box<Literal>>>(self, v: T) -> Self
Sets the value of source
to hold a Literal.
Note that all the setters affecting source are
mutually exclusive.
§Example
ⓘ
use google_cloud_bigquery_migration_v2::model::Literal;
let x = SourceSpec::new().set_literal(Literal::default()/* use setters */);
assert!(x.literal().is_some());
assert!(x.base_uri().is_none());Trait Implementations§
Source§impl Clone for SourceSpec
impl Clone for SourceSpec
Source§fn clone(&self) -> SourceSpec
fn clone(&self) -> SourceSpec
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 SourceSpec
impl Debug for SourceSpec
Source§impl Default for SourceSpec
impl Default for SourceSpec
Source§fn default() -> SourceSpec
fn default() -> SourceSpec
Returns the “default value” for a type. Read more
Source§impl PartialEq for SourceSpec
impl PartialEq for SourceSpec
impl StructuralPartialEq for SourceSpec
Auto Trait Implementations§
impl Freeze for SourceSpec
impl RefUnwindSafe for SourceSpec
impl Send for SourceSpec
impl Sync for SourceSpec
impl Unpin for SourceSpec
impl UnwindSafe for SourceSpec
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