Skip to main content

SeedTransport

Trait SeedTransport 

Source
pub trait SeedTransport: Send + Sync {
    // Required method
    fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        method: Method,
        path: &'life1 str,
        body: Option<&'life2 Value>,
        token: &'life3 SecretString,
        timeout: Duration,
    ) -> Pin<Box<dyn Future<Output = Result<(u16, Value), RuntimeError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;

    // Provided method
    fn link_security(&self) -> LinkSecurity { ... }
}
Expand description

Sends requests to one Seed.

Required Methods§

Source

fn request<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, method: Method, path: &'life1 str, body: Option<&'life2 Value>, token: &'life3 SecretString, timeout: Duration, ) -> Pin<Box<dyn Future<Output = Result<(u16, Value), RuntimeError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Send method path with an optional JSON body; returns status and parsed JSON (Value::Null for an empty or non-JSON body).

Provided Methods§

How this link authenticates the Seed. Fails closed.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§