pub struct Delivery {
pub config: ClientConfig,
pub client: Client,
}Expand description
Async HTTP client for the Contentstack Content Delivery API (CDN).
Holds a connection pool and injects the required authentication headers on every request automatically.
Fields§
§config: ClientConfig§client: ClientImplementations§
Source§impl Delivery
impl Delivery
Sourcepub fn new(
api_key: &str,
delivery_token: &str,
environment: &str,
opts: Option<ClientOptions>,
) -> Self
pub fn new( api_key: &str, delivery_token: &str, environment: &str, opts: Option<ClientOptions>, ) -> Self
Creates a new Delivery client.
§Arguments
api_key- Your stack’s API keydelivery_token- Environment-specific delivery tokenenvironment- The publishing environment (e.g."production")opts- Optional configuration overrides (region, timeout, max connections)
§Example
use contentstack_api_client_rs::Delivery;
let client = Delivery::new("my_api_key", "my_delivery_token", "production", None);pub fn entries(&self) -> Entries<'_>
Auto Trait Implementations§
impl Freeze for Delivery
impl !RefUnwindSafe for Delivery
impl Send for Delivery
impl Sync for Delivery
impl Unpin for Delivery
impl UnsafeUnpin for Delivery
impl !UnwindSafe for Delivery
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