amber-api 2.0.0

Rust client for Amber Electric's API
Documentation
#:schema https://www.schemastore.org/cargo.json
[package]
name = "amber-api"

description = "Rust client for Amber Electric's API"
license     = "MIT"
readme      = "README.md"
version     = "2.0.0"

categories = ["api-bindings"]
keywords   = ["amber", "amber-electric", "api"]

authors    = ["JP-Ellis <josh@jpellis.me>"]
repository = "https://github.com/JP-Ellis/amber-api"

################################################################################
## Dependencies
################################################################################
edition = "2024"

[dependencies]
bon = { version = "~3", default-features = false, features = ["alloc"] }
jiff = { version = "~0", default-features = false, features = [
  "alloc",
  "perf-inline",
  "serde",
] }
reqwest = { version = "~0.13", default-features = false, features = [
  "json",
  "query",
  "rustls",
] }
serde = { version = "~1", default-features = false, features = [
  "alloc",
  "derive",
] }
thiserror = "~2"
tokio = { version = "~1", default-features = false, features = ["time"] }
tracing = { version = "0.1.41", default-features = false, features = [
  "attributes",
  "log",
] }

[dev-dependencies]
anyhow            = "=1.0.100"
insta             = "=1.46.1"
pretty_assertions = "=1.4.1"
rstest            = "=0.26.1"
serde_json        = "=1.0.149"
tokio             = { version = "=1.49.0", features = ["macros", "rt-multi-thread"] }

################################################################################
## Features
################################################################################

[features]

################################################################################
## Lints
################################################################################
[lints]

  [lints.rust]
  future-incompatible = "warn"
  missing_docs        = "warn"
  warnings            = "warn"

  [lints.clippy]
  # Lower the priority of groups to allow overriding individual lints
  cargo       = { level = "warn", priority = -1 }
  complexity  = { level = "warn", priority = -1 }
  correctness = { level = "warn", priority = -1 }
  pedantic    = { level = "warn", priority = -1 }
  perf        = { level = "warn", priority = -1 }
  restriction = { level = "warn", priority = -1 }
  style       = { level = "warn", priority = -1 }
  suspicious  = { level = "warn", priority = -1 }

  ########################################
  # Restriction Lints
  ########################################
  # The restriction group contains lints which Clippy deems as opt-in. I prefer
  # using an opt-out approach.
  blanket-clippy-restriction-lints = "allow"

  arbitrary_source_item_ordering = "allow"
  cognitive_complexity           = "allow"
  else_if_without_else           = "allow"
  impl_trait_in_params           = "allow"
  implicit_return                = "allow"
  min_ident_chars                = "allow"
  missing_trait_methods          = "allow"
  pattern_type_mismatch          = "allow"
  pub_with_shorthand             = "allow"
  question_mark_used             = "allow"
  ref_patterns                   = "allow"
  self_named_module_files        = "allow"
  separated_literal_suffix       = "allow"
  single_call_fn                 = "allow"
  single_char_lifetime_names     = "allow"
  unreachable                    = "allow"

  # TODO: Revisit this one https://github.com/rust-lang/rust-clippy/issues/15111
  # is resolved.
  return_and_then = "allow"

  # TODO: Revisit this once https://github.com/rust-lang/rust-clippy/issues/14056
  # is resolved.
  panic_in_result_fn = "allow"

  # TODO: Re-enable with the next release following rstest 0.25.0
  empty_structs_with_brackets = "allow"

  [lints.rustdoc]
  missing-crate-level-docs = "warn"