pub trait Dap2 {
// Required methods
fn das<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = &Das> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn dds<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = &Dds> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn variable<'life0, 'life1, 'async_trait>(
&'life0 self,
variable: &'life1 DdsVariableDetails,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send + 'static>>, Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(u64, Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send + 'static>>), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
The Dap2
trait defines the necessary methods for serving a data-source (containing many
variables, or dataset
s in HDF5
terms) over the DAP2
protocol. Additionally the
dods::Dods trait which is implemented for sources implementing this trait handles the
streaming a DODS response of several constrained variables.
Required Methods§
Sourcefn das<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = &Das> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn das<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = &Das> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a reference to a DAS structure for a data-source.
Sourcefn dds<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = &Dds> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dds<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = &Dds> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return a reference to a DDS structure for a data-source.
Sourcefn variable<'life0, 'life1, 'async_trait>(
&'life0 self,
variable: &'life1 DdsVariableDetails,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send + 'static>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn variable<'life0, 'life1, 'async_trait>(
&'life0 self,
variable: &'life1 DdsVariableDetails,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send + 'static>>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stream the bytes of the variable in XDR
(big-endian) format.
Sourcefn raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(u64, Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send + 'static>>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn raw<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(u64, Pin<Box<dyn Stream<Item = Result<Bytes, Error>> + Send + 'static>>), Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stream the raw file (if supported). Should return a tuple with the content-length and a stream of Bytes.