Struct specifications::data::DataIndex
source · pub struct DataIndex { /* private fields */ }
Expand description
Defines an index of all datasets known to the instance.
Implementations§
source§impl DataIndex
impl DataIndex
sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, DataIndexError>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, DataIndexError>
Constructor for the DataIndex 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 DataIndex.
§Returns
A new DataIndex instance with the datasets stored in the file.
§Errors
This function errors if we could not read or parse the file.
sourcepub fn from_reader<R: Read>(reader: R) -> Result<Self, DataIndexError>
pub fn from_reader<R: Read>(reader: R) -> Result<Self, DataIndexError>
Constructor for the DataIndex 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 DataIndex.
§Returns
A new DataIndex instance with the datasets stored in the reader.
§Errors
This function errors if we could not read or parse the reader.
sourcepub fn from_infos(infos: Vec<DataInfo>) -> Result<Self, DataIndexError>
pub fn from_infos(infos: Vec<DataInfo>) -> Result<Self, DataIndexError>
Trait Implementations§
source§impl<'de> Deserialize<'de> for DataIndex
impl<'de> Deserialize<'de> for DataIndex
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
source§impl<'a> IntoIterator for &'a DataIndex
impl<'a> IntoIterator for &'a DataIndex
source§impl<'a> IntoIterator for &'a mut DataIndex
impl<'a> IntoIterator for &'a mut DataIndex
source§impl IntoIterator for DataIndex
impl IntoIterator for DataIndex
Auto Trait Implementations§
impl Freeze for DataIndex
impl RefUnwindSafe for DataIndex
impl Send for DataIndex
impl Sync for DataIndex
impl Unpin for DataIndex
impl UnwindSafe for DataIndex
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
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