Trait Dap2

Source
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 datasets 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§

Source

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.

Source

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.

Source

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.

Source

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.

Implementations on Foreign Types§

Source§

impl<T: Send + Sync + Dap2> Dap2 for Arc<T>

Source§

fn das<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = &Das> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn dds<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = &Dds> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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,

Source§

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,

Implementors§