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
sourceimpl<'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
sourceimpl 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?
sourcefn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
sourceimpl TryIntoRequest for UpdateTemplate<'_>
impl TryIntoRequest for UpdateTemplate<'_>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UpdateTemplate<'a>
impl<'a> Send for UpdateTemplate<'a>
impl<'a> Sync for UpdateTemplate<'a>
impl<'a> Unpin for UpdateTemplate<'a>
impl<'a> !UnwindSafe for UpdateTemplate<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more