Struct heroku_rs::endpoints::slugs::post::SlugCreate [−][src]
pub struct SlugCreate<'a> { pub app_id: &'a str, pub params: SlugCreateParams<'a>, }
Expand description
Create Slug
Create a new slug. For more information please refer to ]Deploying Slugs using the Platform API.](https://devcenter.heroku.com/articles/platform-api-deploying-slugs)
See Heroku documentation for more information about this endpoint
Example:
SlugCreate takes two required parameters, app_id and process_types, and returns the created Slug
.
use heroku_rs::prelude::*; use std::collections::HashMap; let mut process_types = HashMap::new(); process_types.insert("web", "./bin/web -p $PORT"); let response = api_client.request( &SlugCreate::new("APP_ID", process_types) .commit("60883d9e8947a57e04dc9124f25df004866a2051") .commit_description("fixed a bug with API documentation") .buildpack_provided_description("Ruby/Rack") .checksum("SHA256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") .stack("cedar-14") .build(), ); match response { Ok(success) => println!("Success: {:#?}", success), Err(e) => println!("Error: {}", e), }
See how to create the Heroku api_client
.
Fields
app_id: &'a str
app_id is the unique app identifier.
params: SlugCreateParams<'a>
The parameters to pass to the Heroku API
Implementations
impl<'a> SlugCreate<'a>
[src]
impl<'a> SlugCreate<'a>
[src]pub fn new(
app_id: &'a str,
process_types: HashMap<&'a str, &'a str>
) -> SlugCreate<'a>
[src]
app_id: &'a str,
process_types: HashMap<&'a str, &'a str>
) -> SlugCreate<'a>
pub fn buildpack_provided_description(
&mut self,
buildpack_provided_description: &'a str
) -> &mut Self
[src]
pub fn buildpack_provided_description(
&mut self,
buildpack_provided_description: &'a str
) -> &mut Self
[src]pub fn commit_description(&mut self, commit_description: &'a str) -> &mut Self
[src]
pub fn commit_description(&mut self, commit_description: &'a str) -> &mut Self
[src]pub fn build(&self) -> SlugCreate<'a>
[src]
Trait Implementations
impl<'a> HerokuEndpoint<Slug, (), SlugCreateParams<'a>> for SlugCreate<'a>
[src]
impl<'a> HerokuEndpoint<Slug, (), SlugCreateParams<'a>> for SlugCreate<'a>
[src]fn method(&self) -> Method
[src]
fn path(&self) -> String
[src]
fn body(&self) -> Option<SlugCreateParams<'a>>
[src]
fn query(&self) -> Option<QueryType>
[src]
fn url(&self, environment: &ApiEnvironment) -> Url
[src]
fn content_type(&self) -> &str
[src]
fn version(&self) -> &str
[src]
fn agent(&self) -> &str
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for SlugCreate<'a>
impl<'a> Send for SlugCreate<'a>
impl<'a> Sync for SlugCreate<'a>
impl<'a> Unpin for SlugCreate<'a>
impl<'a> UnwindSafe for SlugCreate<'a>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]