Skip to main content

nominal_api/conjure/objects/ingest/api/
ingest_mcap_response.rs

1/// Returns references to the data ingested from an MCAP file.
2#[derive(
3    Debug,
4    Clone,
5    conjure_object::serde::Serialize,
6    conjure_object::serde::Deserialize,
7    PartialEq,
8    Eq,
9    PartialOrd,
10    Ord,
11    Hash
12)]
13#[serde(crate = "conjure_object::serde")]
14#[conjure_object::private::staged_builder::staged_builder]
15#[builder(crate = conjure_object::private::staged_builder, update, inline)]
16pub struct IngestMcapResponse {
17    #[builder(default, list(item(type = super::McapIngestionOutput)))]
18    #[serde(rename = "outputs", skip_serializing_if = "Vec::is_empty", default)]
19    outputs: Vec<super::McapIngestionOutput>,
20    #[builder(
21        default,
22        custom(
23            type = impl
24            Into<Option<super::AsyncHandle>>,
25            convert = |v|v.into().map(Box::new)
26        )
27    )]
28    #[serde(rename = "asyncHandle", skip_serializing_if = "Option::is_none", default)]
29    async_handle: Option<Box<super::AsyncHandle>>,
30}
31impl IngestMcapResponse {
32    /// Constructs a new instance of the type.
33    #[inline]
34    pub fn new() -> Self {
35        Self::builder().build()
36    }
37    #[inline]
38    pub fn outputs(&self) -> &[super::McapIngestionOutput] {
39        &*self.outputs
40    }
41    #[deprecated(note = "Deprecated")]
42    #[inline]
43    pub fn async_handle(&self) -> Option<&super::AsyncHandle> {
44        self.async_handle.as_ref().map(|o| &**o)
45    }
46}