From 7fa92f4e0ca3d145b8dbc4ea7f897f3bbf00a868 Mon Sep 17 00:00:00 2001 From: Jacob Magnusson Date: Wed, 3 Nov 2021 11:06:56 +0100 Subject: [PATCH] fix: Make main structs Debug and Clone --- src/metadata_api.rs | 1 + src/requester.rs | 6 +++--- src/rest_api.rs | 1 + src/suiteql.rs | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/metadata_api.rs b/src/metadata_api.rs index cf6c97d..400ec41 100644 --- a/src/metadata_api.rs +++ b/src/metadata_api.rs @@ -4,6 +4,7 @@ use crate::requester::Requester; use crate::response::Response; use http::Method; +#[derive(Debug, Clone)] pub struct MetadataApi { requester: Requester, } diff --git a/src/requester.rs b/src/requester.rs index fd574d6..28106be 100644 --- a/src/requester.rs +++ b/src/requester.rs @@ -6,9 +6,9 @@ use crate::params::Params; use crate::response::Response; use crate::Error; use http::Method; -use log::{debug, info}; +use log::debug; -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct Requester { config: Config, base_url: String, @@ -76,7 +76,7 @@ impl Requester { } let resp = if let Some(payload) = payload { - info!("Payload: {}", payload); + debug!("Payload: {}", payload); req.send_string(payload) } else { req.send_string("") diff --git a/src/rest_api.rs b/src/rest_api.rs index d686618..6282471 100644 --- a/src/rest_api.rs +++ b/src/rest_api.rs @@ -10,6 +10,7 @@ use super::suiteql::SuiteQl; static DEFAULT_BASE_URL: &str = "https://{}.suitetalk.api.netsuite.com/services/rest"; +#[derive(Debug, Clone)] pub struct RestApi { requester: Requester, pub suiteql: SuiteQl, diff --git a/src/suiteql.rs b/src/suiteql.rs index 14cced4..3e2b2cb 100644 --- a/src/suiteql.rs +++ b/src/suiteql.rs @@ -4,6 +4,7 @@ use crate::requester::Requester; use crate::response::Response; use http::Method; +#[derive(Debug, Clone)] pub struct SuiteQl { requester: Requester, limit: usize,