aboutsummaryrefslogtreecommitdiffstats
path: root/crates/rocie-client/src/apis/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/rocie-client/src/apis/mod.rs')
-rw-r--r--crates/rocie-client/src/apis/mod.rs21
1 files changed, 11 insertions, 10 deletions
diff --git a/crates/rocie-client/src/apis/mod.rs b/crates/rocie-client/src/apis/mod.rs
index dd7464f..c8e4015 100644
--- a/crates/rocie-client/src/apis/mod.rs
+++ b/crates/rocie-client/src/apis/mod.rs
@@ -16,7 +16,7 @@ pub enum Error<T> {
ResponseError(ResponseContent<T>),
}
-impl<T> fmt::Display for Error<T> {
+impl <T> fmt::Display for Error<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let (module, e) = match self {
Error::Reqwest(e) => ("reqwest", e.to_string()),
@@ -28,7 +28,7 @@ impl<T> fmt::Display for Error<T> {
}
}
-impl<T: fmt::Debug> error::Error for Error<T> {
+impl <T: fmt::Debug> error::Error for Error<T> {
fn source(&self) -> Option<&(dyn error::Error + 'static)> {
Some(match self {
Error::Reqwest(e) => e,
@@ -39,19 +39,19 @@ impl<T: fmt::Debug> error::Error for Error<T> {
}
}
-impl<T> From<reqwest::Error> for Error<T> {
+impl <T> From<reqwest::Error> for Error<T> {
fn from(e: reqwest::Error) -> Self {
Error::Reqwest(e)
}
}
-impl<T> From<serde_json::Error> for Error<T> {
+impl <T> From<serde_json::Error> for Error<T> {
fn from(e: serde_json::Error) -> Self {
Error::Serde(e)
}
}
-impl<T> From<std::io::Error> for Error<T> {
+impl <T> From<std::io::Error> for Error<T> {
fn from(e: std::io::Error) -> Self {
Error::Io(e)
}
@@ -78,10 +78,8 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String
value,
));
}
- }
- serde_json::Value::String(s) => {
- params.push((format!("{}[{}]", prefix, key), s.clone()))
- }
+ },
+ serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())),
_ => params.push((format!("{}[{}]", prefix, key), value.to_string())),
}
}
@@ -98,7 +96,7 @@ pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String
enum ContentType {
Json,
Text,
- Unsupported(String),
+ Unsupported(String)
}
impl From<&str> for ContentType {
@@ -117,13 +115,16 @@ pub mod api_get_auth_inventory_api;
pub mod api_get_auth_product_api;
pub mod api_get_auth_product_parent_api;
pub mod api_get_auth_recipe_api;
+pub mod api_get_auth_recipe_parent_api;
pub mod api_get_auth_unit_api;
pub mod api_get_auth_unit_property_api;
pub mod api_get_auth_user_api;
+pub mod api_get_no_auth_state_api;
pub mod api_set_auth_barcode_api;
pub mod api_set_auth_product_api;
pub mod api_set_auth_product_parent_api;
pub mod api_set_auth_recipe_api;
+pub mod api_set_auth_recipe_parent_api;
pub mod api_set_auth_unit_api;
pub mod api_set_auth_unit_property_api;
pub mod api_set_auth_user_api;