pub struct PasteRequestData {
pub v: u32,
pub adata: PasteAdata,
pub ct: String,
pub meta: PasteMeta,
}Expand description
Deserialized form of the JSON paste data that is sent to the web API of PrivateBin The JSON data takes the below form:
{
"v": 2, // Version (recommended: 2)
"adata": [ // JSON associated data that is used in the paste encryption to authenticate any sent copies of the associated data
[
string, // Base64 encoded Cipher Initialization Vector (IV)
string, // Base64 encoded Key Derivation Function (KDF) salt
number, // KDF iterations (recommended: 100000)
number, // KDF keysize (recommended: 256)
number, // Cipher tag size in bits (recommended: 128)
string, // Cipher algorithm (recommended: "aes")
string, // Cipher mode (recommended: "gcm")
string, // Compression type (recommended: "zlib")
],
string, // paste format: One of "plaintext","syntaxhighlighting", or "markdown",
number, // open-discussion flag: Either 0 or 1
number, // burn-after-reading flag: Either 0 or 1
],
"ct": string, // Base64 encoded Cipher Text
"meta": {
"expire": string // Expire after duration (examples: "5min", "1day", "2year", and "never")
}
}[Source] (https://github.com/PrivateBin/PrivateBin/wiki/API#as-of-version-13)
Fields§
§v: u32§adata: PasteAdata§ct: String§meta: PasteMetaTrait Implementations§
Source§impl Debug for PasteRequestData
impl Debug for PasteRequestData
Source§impl<'de> Deserialize<'de> for PasteRequestData
impl<'de> Deserialize<'de> for PasteRequestData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Freeze for PasteRequestData
impl RefUnwindSafe for PasteRequestData
impl Send for PasteRequestData
impl Sync for PasteRequestData
impl Unpin for PasteRequestData
impl UnsafeUnpin for PasteRequestData
impl UnwindSafe for PasteRequestData
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