[][src]Struct wallabag_api::types::NewEntry

pub struct NewEntry {
    pub url: String,
    pub title: Option<String>,
    pub tags: Option<Vec<String>>,
    pub archive: Option<bool>,
    pub starred: Option<bool>,
    pub public: Option<bool>,
    pub content: Option<String>,
    pub language: Option<String>,
    pub preview_picture: Option<String>,
    pub published_at: Option<DateTime<Utc>>,
    pub authors: Option<String>,
    pub origin_url: Option<String>,
}

A struct representing an entry to be created. At least url must be provided. If you wish to provide the HTML content you must also provide content and title to prevent the wallabag server from fetching it from the url.

Fields

url: Stringtitle: Option<String>tags: Option<Vec<String>>

Tags containing a comma are valid but discouraged... Also note that these are tag labels as strings, not Tag objects.

archive: Option<bool>starred: Option<bool>public: Option<bool>content: Option<String>language: Option<String>preview_picture: Option<String>published_at: Option<DateTime<Utc>>authors: Option<String>

Formatted as "name 1, name 2"

origin_url: Option<String>

Methods

impl NewEntry[src]

pub fn new_with_url(url: String) -> Self[src]

Create a new entry with a url (url is the only mandatory field). The rest of the fields will be populated with None.

Trait Implementations

impl Debug for NewEntry[src]

impl<'de> Deserialize<'de> for NewEntry[src]

impl Serialize for NewEntry[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: Deserialize<'de>, 
[src]

impl<T> From<T> 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.