Skip to main content

ExportRequest

Struct ExportRequest 

Source
pub(crate) struct ExportRequest {
    pub(crate) asset: u32,
    pub(crate) channels: Vec<u8>,
    pub(crate) start: String,
    pub(crate) end: String,
    pub(crate) format: ExportFormat,
    pub(crate) download_name: Option<String>,
    pub(crate) ack_subject: Option<String>,
    pub(crate) filters: Option<Value>,
}
Expand description

Export request accepted by both WebSocket and NATS worker modes.

Sent as a JSON object with snake_case field names, for example:

{"asset":1,"channels":[0,1],"start":"2026-09-21T14:00:00Z",
 "end":"2026-09-21T15:00:00Z","format":"csv",
 "download_name":"run.csv","ack_subject":"_INBOX.abc.ack"}

Validation (in process_nats_request and serve_export_request) rejects an empty channel list, unparseable timestamps, end before start, and any format other than CSV.

Fields§

§asset: u32

Asset number; selects the assetNNN directory under the Parquet root.

§channels: Vec<u8>

LabJack channel numbers to export. Sorted and deduplicated before use, and exported one channel after another in that order. Must not be empty.

§start: String

Start of the range, RFC 3339 (any offset, converted to UTC). Inclusive.

§end: String

End of the range, RFC 3339 (any offset, converted to UTC). Inclusive, and may equal start.

§format: ExportFormat

Output format. Default: csv.

§download_name: Option<String>

File name reported in the meta frame. Default: labjack_asset<NNN>_<start>_<end>.csv with times as %Y%m%dT%H%M%S in UTC.

§ack_subject: Option<String>

Worker mode only. Subject on which the client publishes one message per received chunk; the worker subscribes to it and pauses every 8 chunks until the acks arrive. Missing or blank disables backpressure. Ignored in direct mode.

§filters: Option<Value>

Noise filters per channel, keyed by channel number as a string, in the shape of the config’s sensor_settings.filters (see filters). When a requested channel has any filter on, every row gets a filtered_value column. Absent, empty or all off: the CSV is exactly as without this field.

Trait Implementations§

Source§

impl Clone for ExportRequest

Source§

fn clone(&self) -> ExportRequest

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ExportRequest

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ExportRequest

Source§

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 Serialize for ExportRequest

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more