pub struct TemplateId(/* private fields */);
Implementations§
Source§impl TemplateId
impl TemplateId
Sourcepub fn new<T: Into<String>>(id: T) -> Result<Self>
pub fn new<T: Into<String>>(id: T) -> Result<Self>
Create a new template_id.
§Example
use std::env;
use carbone_sdk_rust::template::TemplateId;
use carbone_sdk_rust::errors::CarboneError;
fn main() -> Result<(), CarboneError> {
let template_id = TemplateId::new("0545253258577a632a99065f0572720225f5165cc43db9515e9cef0e17b40114".to_string())?;
assert_eq!(template_id.as_str().is_empty(), false);
Ok(())
}
pub fn from_bytes(data: Vec<u8>, payload: Option<&str>) -> Result<Self>
Trait Implementations§
Source§impl AsRef<str> for TemplateId
impl AsRef<str> for TemplateId
Source§impl Clone for TemplateId
impl Clone for TemplateId
Source§fn clone(&self) -> TemplateId
fn clone(&self) -> TemplateId
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TemplateId
impl Debug for TemplateId
Source§impl Deref for TemplateId
impl Deref for TemplateId
Source§impl<'de> Deserialize<'de> for TemplateId
impl<'de> Deserialize<'de> for TemplateId
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for TemplateId
impl PartialEq for TemplateId
Source§impl Serialize for TemplateId
impl Serialize for TemplateId
impl Eq for TemplateId
impl StructuralPartialEq for TemplateId
Auto Trait Implementations§
impl Freeze for TemplateId
impl RefUnwindSafe for TemplateId
impl Send for TemplateId
impl Sync for TemplateId
impl Unpin for TemplateId
impl UnwindSafe for TemplateId
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.