pub struct ContentfulManagementClient { /* private fields */ }Implementations§
Source§impl ContentfulManagementClient
impl ContentfulManagementClient
pub fn new( management_api_access_token: &str, space_id: &str, ) -> ContentfulManagementClient
pub fn with_environment<S>( management_api_access_token: &str, space_id: &str, environment_id: &str, ) -> ContentfulManagementClient
pub async fn get_entry( &self, entry_id: &str, ) -> Result<Option<Entry<Value>>, Box<dyn Error>>
pub async fn get_entry_for_locale<T>(
&self,
entry_id: &str,
locale: &str,
) -> Result<Option<Entry<T>>, Box<dyn Error>>where
T: DeserializeOwned + Serialize,
pub async fn create_entry_from_json<T>(
&self,
entry: &Value,
content_type_id: &str,
) -> Result<T, Box<dyn Error>>where
T: DeserializeOwned,
pub async fn create_entry<T>(
&self,
entry: &T,
content_type_id: &str,
) -> Result<T, Box<dyn Error>>where
T: DeserializeOwned + Serialize,
pub async fn create_entry_for_locale<T>(
&self,
entry: &T,
content_type_id: &str,
locale: &str,
) -> Result<T, Box<dyn Error>>where
T: DeserializeOwned + Serialize,
pub async fn create_or_update_entry_from_json( &self, entry: &Value, entry_id: &str, version: &Option<i32>, content_type_id: &str, ) -> Result<Value, Box<dyn Error>>
pub async fn create_or_update_entry( &self, entry: &Entry<Value>, id: &str, content_type_id: &str, ) -> Result<Entry<Value>, Box<dyn Error>>
pub async fn create_or_update_entry_for_locale<T>(
&self,
entry: &Entry<T>,
id: &str,
locale: &str,
content_type_id: &str,
) -> Result<Entry<T>, Box<dyn Error>>where
T: DeserializeOwned + Serialize,
Auto Trait Implementations§
impl Freeze for ContentfulManagementClient
impl RefUnwindSafe for ContentfulManagementClient
impl Send for ContentfulManagementClient
impl Sync for ContentfulManagementClient
impl Unpin for ContentfulManagementClient
impl UnwindSafe for ContentfulManagementClient
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