feat(core/result): add rocket and okapi support

This commit is contained in:
Paul Makles
2023-06-03 13:01:12 +01:00
parent a29d8f6aab
commit e393e17b59
4 changed files with 150 additions and 0 deletions

View File

@@ -11,12 +11,20 @@ description = "Revolt Backend: Result and Error types"
[features]
serde = [ "dep:serde" ]
schemas = [ "dep:schemars" ]
rocket = [ "dep:rocket", "dep:serde_json" ]
okapi = [ "dep:revolt_rocket_okapi", "dep:revolt_okapi" ]
default = [ "serde" ]
[dependencies]
# Serialisation
serde_json = { version = "1", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
# Spec Generation
schemars = { version = "0.8.8", optional = true }
# Rocket
rocket = { optional = true, version = "0.5.0-rc.2", default-features = false }
revolt_rocket_okapi = { version = "0.9.1", optional = true }
revolt_okapi = { version = "0.9.1", optional = true }