Crate s2

Crate s2 

Source
👎Deprecated since 0.21.1: This crate has been renamed to s2-sdk. Please update your Cargo.toml to use s2-sdk instead.
Expand description

DEPRECATED: This crate has been renamed to s2-sdk.

Please update your Cargo.toml:

[dependencies]
s2-sdk = "0.22"

And update your imports from use s2::... to use s2_sdk::....

The Rust SDK provides ergonomic wrappers and utilities to interact with the S2 API.

§Getting started

  1. Ensure you have tokio added as a dependency. The SDK relies on Tokio for executing async code.

    cargo add tokio --features full
  2. Add the streamstore dependency to your project:

    cargo add streamstore
  3. Generate an authentication token by logging onto the web console at s2.dev.

  4. Make a request using SDK client.

    let config = s2::ClientConfig::new("<YOUR AUTH TOKEN>");
    let client = s2::Client::new(config);
    
    let basins = client.list_basins(Default::default()).await?;
    println!("My basins: {:?}", basins);

See documentation for the client module for more information on how to use the client, and what requests can be made.

§Examples

We have curated a bunch of examples in the SDK repository demonstrating how to use the SDK effectively:

This documentation is generated using rustdoc-scrape-examples, so you will be able to see snippets from examples right here in the documentation.

§Feedback

We use Github Issues to track feature requests and issues with the SDK. If you wish to provide feedback, report a bug or request a feature, feel free to open a Github issue.

Re-exports§

pub use client::BasinClient;Deprecated
pub use client::Client;Deprecated
pub use client::ClientConfig;Deprecated
pub use client::StreamClient;Deprecated

Modules§

batchingDeprecated
Append records batching stream.
clientDeprecated
SDK client implementation.
typesDeprecated
Types for interacting with S2 services.

Type Aliases§

StreamingDeprecated
Generic type for streaming response.