pub struct DataInfo {
pub name: String,
pub owners: Option<Vec<String>>,
pub description: Option<String>,
pub created: DateTime<Utc>,
pub access: HashMap<Location, AccessKind>,
}
Expand description
Defines a single DataInfo file that describes a dataset and how to access it.
Fields§
§name: String
Defines the name (=identifier) of the DataInfo. Must be unique across the instance.
owners: Option<Vec<String>>
The list of owners of this asset.
description: Option<String>
A (short) description of the asset.
created: DateTime<Utc>
The created timestamp of the asset.
access: HashMap<Location, AccessKind>
Defines how to access this DataInfo per location that advertises it.
Implementations§
source§impl DataInfo
impl DataInfo
sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, DataInfoError>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, DataInfoError>
Constructor for the DataInfo that reads it from the given path.
§Generic arguments
P
: The &Path-like type of thepath
.
§Arguments
path
: The path from which we will read the DataInfo.
§Returns
A new DataInfo instance representing the asset described in the given file.
§Errors
This function errors if we could not read or parse the file.
sourcepub fn from_reader<R: Read>(reader: R) -> Result<Self, DataInfoError>
pub fn from_reader<R: Read>(reader: R) -> Result<Self, DataInfoError>
Constructor for the DataInfo that reads it from the given reader.
§Generic arguments
R
: The Read-enabled type of thereader
.
§Arguments
reader
: The reader from which we will read the DataInfo.
§Returns
A new DataInfo instance representing the asset described in the given reader.
§Errors
This function errors if we could not read or parse the reader.
Trait Implementations§
source§impl<'de> Deserialize<'de> for DataInfo
impl<'de> Deserialize<'de> for DataInfo
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
Auto Trait Implementations§
impl Freeze for DataInfo
impl RefUnwindSafe for DataInfo
impl Send for DataInfo
impl Sync for DataInfo
impl Unpin for DataInfo
impl UnwindSafe for DataInfo
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request