Struct pastemyst::paste::EditObject[][src]

pub struct EditObject {
    pub title: String,
    pub isPrivate: bool,
    pub isPublic: bool,
    pub tags: String,
    pub pasties: Vec<PastyObject>,
}

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.

tags: String

List of tags, comma separated.

pasties: Vec<PastyObject>

List of pasties.

Trait Implementations

impl Serialize for EditObject[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.