Struct twilight_http::request::template::UpdateTemplate
source · pub struct UpdateTemplate<'a> { /* private fields */ }Expand description
Update the template’s metadata, by ID and code.
Implementations§
source§impl<'a> UpdateTemplate<'a>
impl<'a> UpdateTemplate<'a>
sourcepub fn description(self, description: &'a str) -> Result<Self, ValidationError>
pub fn description(self, description: &'a str) -> Result<Self, ValidationError>
Set the description.
This must be at most 120 characters in length.
Errors
Returns an error of type TemplateDescription if the name length is
too short or too long.
sourcepub fn name(self, name: &'a str) -> Result<Self, ValidationError>
pub fn name(self, name: &'a str) -> Result<Self, ValidationError>
Set the name.
This 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.
Trait Implementations§
source§impl IntoFuture for UpdateTemplate<'_>
impl IntoFuture for UpdateTemplate<'_>
§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