Struct pastemyst::paste::EditObject [−][src]
The same as CreateObject
except
that it does not have the expiresIn
field which has been removed for
convenience. This may change in
the future, but for the current
moment, this shall remain.
You can only edit pastes on your account, so you must provide the Authorization header. it returns a full paste object. To edit a paste you need to provide only the values you are editing in the JSON body.
To edit a single pasty you will need to provide all of the original pasties changing the fields pasty without providing all of the pasties.
API Docs
The relevent link to the API documentation is: https://paste.myst.rs/api-docs/paste#edit-a-paste
Examples
let _data: CreateObject = CreateObject { title: String::from("[crates.io/crates/pastemyst] This is a title"), expiresIn: String::from("1d"), isPrivate: false, isPublic: false, tags: String::from(""), pasties: var_pasties, };
Fields
title: String
Title of the paste.
isPrivate: bool
If it"s private it"s only accessible by the owner.
isPublic: bool
Is it displayed on the owner's public profile.
List of tags, comma separated.
pasties: Vec<PastyObject>
List of pasties.
Trait Implementations
impl Serialize for EditObject
[src]
Auto Trait Implementations
impl RefUnwindSafe for EditObject
[src]
impl Send for EditObject
[src]
impl Sync for EditObject
[src]
impl Unpin for EditObject
[src]
impl UnwindSafe for EditObject
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,