Struct pastemyst::paste::PasteObject[][src]

pub struct PasteObject {
    pub _id: String,
    pub ownerId: String,
    pub title: String,
    pub createdAt: u64,
    pub expiresIn: String,
    pub deletesAt: u64,
    pub stars: u64,
    pub isPrivate: bool,
    pub isPublic: bool,
    pub tags: Vec<String>,
    pub pasties: Vec<PastyObject>,
    pub edits: Vec<EditHistory>,
}

The paste object recieved when getting a paste. It contains both the PastyObject and EditHistory in an array.

API Docs

The relevent link to the API documentation is: https://paste.myst.rs/api-docs/objects

Examples

let _foo: PasteObject = get_paste("hipfqanx");

Fields

_id: String

Id of the paste.

ownerId: String

Id of the owner, if it doesn't have an owner it's set to "".

title: String

Title of the paste.

createdAt: u64

Unix time of when the paste is created.

expiresIn: String

When the paste will expire, possible values are never, 1h, 2h, 10h, 1d, 2d, 1w, 1m, 1y.

deletesAt: u64

When the paste will be deleted, if it has no expiry time it's set to 0.

stars: u64

Number of stars the paste received.

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: Vec<String>

List of tags.

pasties: Vec<PastyObject>

List of pasties/files in the paste, can't be empty.

edits: Vec<EditHistory>

List of edits.

Trait Implementations

impl<'de> Deserialize<'de> for PasteObject[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[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.