pub struct BindingSource { /* private fields */ }Expand description
Default provider of one recipe binding.
Implementations§
Source§impl BindingSource
impl BindingSource
Sourcepub fn file(path: impl AsRef<Path>) -> BindingSource
pub fn file(path: impl AsRef<Path>) -> BindingSource
Use a local file as the default complete input object.
Sourcepub fn binding(name: impl Into<String>) -> BindingSource
pub fn binding(name: impl Into<String>) -> BindingSource
Use an actual other binding, with an optional selection.
Sourcepub fn key(self, key: impl Into<RawKey>) -> BindingSource
pub fn key(self, key: impl Into<RawKey>) -> BindingSource
Select one exact key from the referenced source.
Sourcepub fn selector(self, selection: impl Into<BindingSelector>) -> BindingSource
pub fn selector(self, selection: impl Into<BindingSelector>) -> BindingSource
Select from the referenced source.
Sourcepub fn format(self, format: impl Into<String>) -> BindingSource
pub fn format(self, format: impl Into<String>) -> BindingSource
Set the explicit reader format instead of selecting by file suffix.
Sourcepub fn delimiter(self, delimiter: impl Into<String>) -> BindingSource
pub fn delimiter(self, delimiter: impl Into<String>) -> BindingSource
Set an explicit CSV/TSV delimiter.
Sourcepub fn encoding(self, encoding: impl Into<String>) -> BindingSource
pub fn encoding(self, encoding: impl Into<String>) -> BindingSource
Set an explicit CSV/TSV character encoding.
Sourcepub fn has_header(self, has_header: bool) -> BindingSource
pub fn has_header(self, has_header: bool) -> BindingSource
Specify whether the first CSV/TSV record is a header.
Sourcepub fn schema<K, V>(
self,
entries: impl IntoIterator<Item = (K, V)>,
) -> BindingSource
pub fn schema<K, V>( self, entries: impl IntoIterator<Item = (K, V)>, ) -> BindingSource
Set text-field logical type declarations without replacing the raw tokens.
Sourcepub fn null_values<S>(
self,
values: impl IntoIterator<Item = S>,
) -> BindingSource
pub fn null_values<S>( self, values: impl IntoIterator<Item = S>, ) -> BindingSource
Set missing text tokens for every file field.
Sourcepub fn field_null_values<K, S, V>(
self,
entries: impl IntoIterator<Item = (K, V)>,
) -> BindingSource
pub fn field_null_values<K, S, V>( self, entries: impl IntoIterator<Item = (K, V)>, ) -> BindingSource
Set missing text tokens for specific original file fields.
Sourcepub fn key_map<K, V>(
self,
entries: impl IntoIterator<Item = (K, V)>,
) -> BindingSource
pub fn key_map<K, V>( self, entries: impl IntoIterator<Item = (K, V)>, ) -> BindingSource
Map logical recipe field keys to actual file keys or positions.
Sourcepub fn reference(&self) -> Option<(&str, &BindingSelector)>
pub fn reference(&self) -> Option<(&str, &BindingSelector)>
Original logical dependency, for reference sources.
Trait Implementations§
impl BindingSourceInput for BindingSource
Source§impl Clone for BindingSource
impl Clone for BindingSource
Source§fn clone(&self) -> BindingSource
fn clone(&self) -> BindingSource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BindingSource
impl Debug for BindingSource
impl Eq for BindingSource
Source§impl PartialEq for BindingSource
impl PartialEq for BindingSource
impl StructuralPartialEq for BindingSource
Auto Trait Implementations§
impl Forget for BindingSource
impl Freeze for BindingSourcewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<[u8]> is !null: Freeze,
PhantomData<ArcInner<[u8]>>: Freeze,
PhantomData<RawKey>: Freeze,
*const RawKey is !null: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
PhantomData<isize>: Freeze,
PhantomData<(String, String)>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, Vec<String>)>: Freeze,
PhantomData<(RawKey, BindingSelector)>: Freeze,
&'static str: Freeze,
impl Move for BindingSource
impl RefUnwindSafe for BindingSource
impl Send for BindingSource
impl Sync for BindingSource
impl Unpin for BindingSource
impl UnsafeUnpin for BindingSourcewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<[u8]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[u8]>>: UnsafeUnpin,
PhantomData<RawKey>: UnsafeUnpin,
*const RawKey is !null: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
PhantomData<isize>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, Vec<String>)>: UnsafeUnpin,
PhantomData<(RawKey, BindingSelector)>: UnsafeUnpin,
&'static str: UnsafeUnpin,
impl UnwindSafe for BindingSourcewhere
RawVecInner: UnwindSafe,
Arc<[u8]>: UnwindSafe,
BoxRaw<RawKey>: UnwindSafe,
Arc<str>: UnwindSafe,
&'static str: UnwindSafe,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.