pub struct Entry<T> {
pub uid: String,
pub title: String,
pub locale: String,
pub created_at: String,
pub updated_at: String,
pub created_by: String,
pub updated_by: String,
pub version: u32,
pub fields: T,
}Expand description
A Contentstack entry with system fields plus caller-defined custom fields.
System fields (uid, title, locale, etc.) are always present.
T holds your content type’s custom fields, deserialized from the same
JSON object via #[serde(flatten)].
§Example
use serde::Deserialize;
use contentstack_api_client_rs::Entry;
#[derive(Deserialize)]
struct BlogPost {
pub body: String,
pub url: String,
}
// entry.uid, entry.title - system fields
// entry.fields.body - your custom fieldFields§
§uid: String§title: String§locale: String§created_at: String§updated_at: String§created_by: String§updated_by: String§version: u32§fields: TCaller’s custom fields - flattened into the same JSON object.
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for Entry<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Entry<T>where
T: Deserialize<'de>,
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
Auto Trait Implementations§
impl<T> Freeze for Entry<T>where
T: Freeze,
impl<T> RefUnwindSafe for Entry<T>where
T: RefUnwindSafe,
impl<T> Send for Entry<T>where
T: Send,
impl<T> Sync for Entry<T>where
T: Sync,
impl<T> Unpin for Entry<T>where
T: Unpin,
impl<T> UnsafeUnpin for Entry<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for Entry<T>where
T: UnwindSafe,
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