Struct dbcrossbarlib::SourceArguments
source · pub struct SourceArguments<ArgumentState> { /* private fields */ }
Expand description
Data source arguments.
Implementations§
source§impl SourceArguments<Unverified>
impl SourceArguments<Unverified>
sourcepub fn new(
driver_args: DriverArguments,
format: Option<DataFormat>,
where_clause: Option<String>
) -> Self
pub fn new( driver_args: DriverArguments, format: Option<DataFormat>, where_clause: Option<String> ) -> Self
Construct a new SourceArguments
.
sourcepub fn for_temporary() -> Self
pub fn for_temporary() -> Self
Construct a new SourceArguments
with typical values for a temporary
storage location.
sourcepub fn with_format_csv(self) -> Result<Self>
pub fn with_format_csv(self) -> Result<Self>
Set the format to CSV, returning an error if it was already set. This
is used by the csv:
driver for backwards compatibility.
sourcepub fn verify(self, features: Features) -> Result<SourceArguments<Verified>>
pub fn verify(self, features: Features) -> Result<SourceArguments<Verified>>
Verify that this structure only contains supported arguments. This uses the type state pattern to keep track of whether our arguments have been verified to be supported.
source§impl SourceArguments<Verified>
impl SourceArguments<Verified>
sourcepub fn driver_args(&self) -> &DriverArguments
pub fn driver_args(&self) -> &DriverArguments
Driver-specific arguments for our data source.
sourcepub fn format(&self) -> Option<&DataFormat>
pub fn format(&self) -> Option<&DataFormat>
The format for data associated with this locator, if applicable.
sourcepub fn where_clause(&self) -> Option<&str>
pub fn where_clause(&self) -> Option<&str>
A WHERE
clause for this query.
Trait Implementations§
source§impl<ArgumentState: Clone> Clone for SourceArguments<ArgumentState>
impl<ArgumentState: Clone> Clone for SourceArguments<ArgumentState>
source§fn clone(&self) -> SourceArguments<ArgumentState>
fn clone(&self) -> SourceArguments<ArgumentState>
Returns a copy 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<ArgumentState: Debug> Debug for SourceArguments<ArgumentState>
impl<ArgumentState: Debug> Debug for SourceArguments<ArgumentState>
source§impl<ArgumentState: Default> Default for SourceArguments<ArgumentState>
impl<ArgumentState: Default> Default for SourceArguments<ArgumentState>
source§fn default() -> SourceArguments<ArgumentState>
fn default() -> SourceArguments<ArgumentState>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<ArgumentState> RefUnwindSafe for SourceArguments<ArgumentState>where ArgumentState: RefUnwindSafe,
impl<ArgumentState> Send for SourceArguments<ArgumentState>where ArgumentState: Send,
impl<ArgumentState> Sync for SourceArguments<ArgumentState>where ArgumentState: Sync,
impl<ArgumentState> Unpin for SourceArguments<ArgumentState>where ArgumentState: Unpin,
impl<ArgumentState> UnwindSafe for SourceArguments<ArgumentState>where ArgumentState: UnwindSafe,
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