pub struct ExportCfg {
pub fields: Option<Vec<StateParameter>>,
pub start_epoch: Option<Epoch>,
pub end_epoch: Option<Epoch>,
pub step: Option<Duration>,
pub metadata: Option<HashMap<String, String>>,
pub timestamp: bool,
}
Expand description
Configuration for exporting a trajectory to parquet.
Fields§
§fields: Option<Vec<StateParameter>>
Fields to export, if unset, defaults to all possible fields.
start_epoch: Option<Epoch>
Start epoch to export, defaults to the start of the trajectory
end_epoch: Option<Epoch>
End epoch to export, defaults to the end of the trajectory
step: Option<Duration>
An optional step, defaults to every state in the trajectory (which likely isn’t equidistant)
metadata: Option<HashMap<String, String>>
Additional metadata to store in the Parquet metadata
timestamp: bool
Set to true to append the timestamp to the filename
Implementations§
source§impl ExportCfg
impl ExportCfg
sourcepub fn builder() -> ExportCfgBuilder<((), (), (), (), (), ())>
pub fn builder() -> ExportCfgBuilder<((), (), (), (), (), ())>
Create a builder for building ExportCfg
.
On the builder, call .fields(...)
(optional), .start_epoch(...)
(optional), .end_epoch(...)
(optional), .step(...)
(optional), .metadata(...)
(optional), .timestamp(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ExportCfg
.
source§impl ExportCfg
impl ExportCfg
sourcepub fn from_metadata(metadata: Vec<(String, String)>) -> Self
pub fn from_metadata(metadata: Vec<(String, String)>) -> Self
Initialize a new configuration with the given metadata entries.
sourcepub fn timestamped() -> Self
pub fn timestamped() -> Self
Initialize a new default configuration but timestamp the filename.
pub fn append_field(&mut self, field: StateParameter)
Trait Implementations§
source§impl<'de> Deserialize<'de> for ExportCfg
impl<'de> Deserialize<'de> for ExportCfg
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>,
Auto Trait Implementations§
impl Freeze for ExportCfg
impl RefUnwindSafe for ExportCfg
impl Send for ExportCfg
impl Sync for ExportCfg
impl Unpin for ExportCfg
impl UnwindSafe for ExportCfg
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
source§impl<T> FromDhall for Twhere
T: DeserializeOwned,
impl<T> FromDhall for Twhere
T: DeserializeOwned,
fn from_dhall(v: &Value) -> Result<T, Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.