Skip to main content

Paste

Struct Paste 

Source
pub struct Paste {
Show 16 fields pub id: String, pub title: Option<String>, pub content: String, pub language: String, pub visibility: String, pub views: u32, pub created_at: String, pub expires_at: Option<String>, pub max_views: Option<u32>, pub updated_at: Option<String>, pub url: Option<String>, pub category: Option<String>, pub tags: Option<String>, pub burn_after_read: Option<bool>, pub encrypted: Option<bool>, pub folder_id: Option<u64>,
}
Expand description

Paste metadata and content.

Fields§

§id: String

Unique paste ID

§title: Option<String>

Paste title (if set)

§content: String

Paste content

§language: String

Syntax highlighting language

§visibility: String

Visibility level

§views: u32

View count

§created_at: String

Creation timestamp

§expires_at: Option<String>

Expiration timestamp (if applicable)

§max_views: Option<u32>

Maximum views limit (if set)

§updated_at: Option<String>

Last update timestamp (if updated)

§url: Option<String>

Web UI URL (for owned pastes)

§category: Option<String>

Category (if set)

§tags: Option<String>

Tags (if set)

§burn_after_read: Option<bool>

Burn after read flag

§encrypted: Option<bool>

Encrypted flag

§folder_id: Option<u64>

Folder ID (if in folder)

Trait Implementations§

Source§

impl Debug for Paste

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Paste

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more

Auto Trait Implementations§

§

impl Forget for Paste

§

impl Freeze for Paste

§

impl RefUnwindSafe for Paste

§

impl Send for Paste

§

impl Sync for Paste

§

impl Unpin for Paste

§

impl UnsafeUnpin for Paste

§

impl UnwindSafe for Paste

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.