pub struct ContentfulClient { /* private fields */ }
Implementations§
Source§impl ContentfulClient
impl ContentfulClient
pub fn new(delivery_api_access_token: &str, space_id: &str) -> ContentfulClient
pub fn with_environment<S>( delivery_api_access_token: &str, space_id: &str, environment_id: &str, ) -> ContentfulClient
pub async fn get_entry<T>(
&self,
entry_id: &str,
) -> Result<Option<T>, Box<dyn Error>>where
for<'a> T: Serialize + Deserialize<'a>,
pub async fn get_contentful_entry( &self, entry_id: &str, ) -> Result<Option<Entry<Value>>, Box<dyn Error>>
pub async fn get_entry_json_value( &self, entry_id: &str, ) -> Result<Option<Value>, Box<dyn Error>>
pub async fn get_entries<T>(
&self,
query_builder: Option<QueryBuilder>,
) -> Result<Vec<T>, Box<dyn Error>>where
for<'a> T: Serialize + Deserialize<'a>,
pub async fn get_entries_by_query_string<T>(
&self,
query_string: &str,
) -> Result<Vec<T>, Box<dyn Error>>where
for<'a> T: Serialize + Deserialize<'a>,
pub async fn get_entries_by_type<T>(
&self,
content_type: &str,
query_builder: Option<QueryBuilder>,
) -> Result<Vec<T>, Box<dyn Error>>where
for<'a> T: Serialize + Deserialize<'a>,
Auto Trait Implementations§
impl Freeze for ContentfulClient
impl RefUnwindSafe for ContentfulClient
impl Send for ContentfulClient
impl Sync for ContentfulClient
impl Unpin for ContentfulClient
impl UnwindSafe for ContentfulClient
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