Struct carbone_sdk_rust::types::JsonData
source · pub struct JsonData { /* private fields */ }
Implementations§
source§impl JsonData
impl JsonData
sourcepub fn new(s: String) -> Result<Self>
pub fn new(s: String) -> Result<Self>
Create a new render_options.
Example
use std::env;
use carbone_sdk_rs::types::JsonData;
use carbone_sdk_rs::errors::CarboneError;
fn main() -> Result<(), CarboneError> {
let render_options_value = r#"
"data" : {
"firstname" : "John",
"lastname" : "Wick"
},
"convertTo" : "odt"
"#;
let render_options = JsonData::new(render_options_value.to_string())?;
assert_eq!(render_options.as_str(), render_options_value);
Ok(())
}
pub fn as_str(&self) -> &str
Trait Implementations§
source§impl PartialEq for JsonData
impl PartialEq for JsonData
impl Eq for JsonData
impl StructuralEq for JsonData
impl StructuralPartialEq for JsonData
Auto Trait Implementations§
impl RefUnwindSafe for JsonData
impl Send for JsonData
impl Sync for JsonData
impl Unpin for JsonData
impl UnwindSafe for JsonData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.