#[non_exhaustive]pub struct DataSource {
pub source: Option<Source>,
/* private fields */
}Expand description
The data source for DataScan.
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.source: Option<Source>The source is required and immutable. Once it is set, it cannot be change to others.
Implementations§
Source§impl DataSource
impl DataSource
pub fn new() -> 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
Sets the value of source.
Note that all the setters affecting source are mutually
exclusive.
Sourcepub fn entity(&self) -> Option<&String>
pub fn entity(&self) -> Option<&String>
The value of source
if it holds a Entity, None if the field is not set or
holds a different branch.
Sourcepub fn set_entity<T: Into<String>>(self, v: T) -> Self
pub fn set_entity<T: Into<String>>(self, v: T) -> Self
Sets the value of source
to hold a Entity.
Note that all the setters affecting source are
mutually exclusive.
Sourcepub fn resource(&self) -> Option<&String>
pub fn resource(&self) -> Option<&String>
The value of source
if it holds a Resource, None if the field is not set or
holds a different branch.
Sourcepub fn set_resource<T: Into<String>>(self, v: T) -> Self
pub fn set_resource<T: Into<String>>(self, v: T) -> Self
Sets the value of source
to hold a Resource.
Note that all the setters affecting source are
mutually exclusive.
Trait Implementations§
Source§impl Clone for DataSource
impl Clone for DataSource
Source§fn clone(&self) -> DataSource
fn clone(&self) -> DataSource
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 DataSource
impl Debug for DataSource
Source§impl Default for DataSource
impl Default for DataSource
Source§fn default() -> DataSource
fn default() -> DataSource
Returns the “default value” for a type. Read more
Source§impl PartialEq for DataSource
impl PartialEq for DataSource
impl StructuralPartialEq for DataSource
Auto Trait Implementations§
impl Freeze for DataSource
impl RefUnwindSafe for DataSource
impl Send for DataSource
impl Sync for DataSource
impl Unpin for DataSource
impl UnwindSafe for DataSource
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