pub struct CreatePasteRequest {
pub content: String,
pub title: Option<String>,
pub language: Option<String>,
pub visibility: Option<PasteVisibility>,
pub expiration: Option<PasteExpiration>,
pub category: Option<PasteCategory>,
pub tags: Option<String>,
pub max_views: Option<u32>,
pub password: Option<String>,
pub burn_after_read: Option<bool>,
pub folder_id: Option<u64>,
pub encrypted: Option<bool>,
}Expand description
Request payload for creating a new paste.
Fields§
§content: StringThe text content (required, max 1 MB UTF-8)
title: Option<String>Optional title for the paste
language: Option<String>Syntax highlighting language (e.g., “rust”, “python”, “json”)
visibility: Option<PasteVisibility>Visibility level
expiration: Option<PasteExpiration>Expiration duration
category: Option<PasteCategory>Category classification
Comma- or space-separated tags (max 8 retained)
max_views: Option<u32>Maximum unique views (1-1000)
password: Option<String>Password for protected access (4-128 chars)
burn_after_read: Option<bool>Delete after first read
folder_id: Option<u64>Folder ID (requires auth)
encrypted: Option<bool>Content is pre-encrypted ciphertext
Trait Implementations§
Source§impl Clone for CreatePasteRequest
impl Clone for CreatePasteRequest
Source§impl Debug for CreatePasteRequest
impl Debug for CreatePasteRequest
Auto Trait Implementations§
impl Forget for CreatePasteRequest
impl Freeze for CreatePasteRequest
impl RefUnwindSafe for CreatePasteRequest
impl Send for CreatePasteRequest
impl Sync for CreatePasteRequest
impl Unpin for CreatePasteRequest
impl UnsafeUnpin for CreatePasteRequest
impl UnwindSafe for CreatePasteRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more