Struct twilight_http::request::template::CreateTemplate
source · pub struct CreateTemplate<'a> { /* private fields */ }Expand description
Create a template from the current state of the guild.
Requires the MANAGE_GUILD permission. The name must be at least 1 and at
most 100 characters in length.
Errors
Returns an error of type TemplateName if the name length is too short or
too long.
Implementations§
source§impl<'a> CreateTemplate<'a>
impl<'a> CreateTemplate<'a>
sourcepub fn description(self, description: &'a str) -> Result<Self, ValidationError>
pub fn description(self, description: &'a str) -> Result<Self, ValidationError>
Set the template’s description.
This must be less than or equal to 120 characters in length.
Errors
Returns an error of type TemplateDescription if the name length is
too short or too long.
Trait Implementations§
source§impl IntoFuture for CreateTemplate<'_>
impl IntoFuture for CreateTemplate<'_>
§type Output = Result<Response<Template>, Error>
type Output = Result<Response<Template>, Error>
The output that the future will produce on completion.
§type IntoFuture = ResponseFuture<Template>
type IntoFuture = ResponseFuture<Template>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more