[][src]Crate apollo_client

Rust🦀 client for Apollo.

Power by Rust async/await.

Installation

With cargo add installed run:

$ cargo add -s apollo-client

Features

  1. Not all features are default, you can read the [features] section of Cargo.toml to know all the features.

  2. The xml and yaml features aren't enable by default, if you have such kind namespace, you should add features in Cargo.toml, just like:

    apollo-client = { version = "0.5", features = ["yaml", "xml"] }
    

    Or simply enable all features:

    apollo-client = { version = "0.5", features = ["full"] }
    
  3. By default, using curl client isahc to handle http request, you can switch to hyper by enable the with-hyper feature.

    apollo-client = { version = "0.5", default-features = false, features = ["with-hyper"] }
    

    Or:

    apollo-client = { version = "0.5", default-features = false, features = ["full-hyper"] }
    

    Or specify the Scenario.

Usage

You can find some examples in the examples directory.

License

Unlicense.

Structs

Client

Represents the apollo client.

ClientConfig

Configuration of Apollo and api information.

Response

Apollo config api response.

Responses

Apollo config api responses.

Enums

ClientError

Apollo client crate side Error.

IpValue

Apollo config api ip param value.

NamespaceKind

Kind of a configuration namespace.

Scenario

Scenario for Client.

Functions

canonicalize_namespace

Canonicalize the namespace. Just add .properties to the end of the namespace which not end with .properties or .xml or .json or .yaml or .yml or .txt.

Type Definitions

ClientResult

Apollo client crate side Result.