Enum ibdl_common::ImageBoards
source · pub enum ImageBoards {
Danbooru,
E621,
Rule34,
Realbooru,
Konachan,
Gelbooru,
}
Expand description
All currently supported imageboards and their underlying attributes
Variants§
Danbooru
Represents the website https://danbooru.donmai.us
or it’s safe variant https://safebooru.donmai.us
.
E621
Represents the website https://e621.net
or it’s safe variant https://e926.net
.
Rule34
Represents the website https://rule34.xxx
Realbooru
Represents the website http://realbooru.com
Konachan
Represents the website https://konachan.com
or it’s safe variant https://konachan.net
.
Gelbooru
Represents the website https://gelbooru.com
.
Implementations§
source§impl ImageBoards
impl ImageBoards
sourcepub fn user_agent(self) -> String
pub fn user_agent(self) -> String
Each variant can generate a specific user-agent to connect to the imageboard site.
It will always follow the version declared inside Cargo.toml
pub fn extractor_user_agent(self) -> String
sourcepub fn post_url(&self) -> &'static str
pub fn post_url(&self) -> &'static str
Returns the endpoint for the post list with their respective tags.
sourcepub fn post_list_url(&self) -> &'static str
pub fn post_list_url(&self) -> &'static str
Returns the endpoint for the post list with their respective tags.
pub fn pool_idx_url(self) -> &'static str
sourcepub fn max_post_limit(self) -> usize
pub fn max_post_limit(self) -> usize
Returns max number of posts per page a imageboard can have
sourcepub fn auth_url(self) -> &'static str
pub fn auth_url(self) -> &'static str
Returns the url used for validating the login input and parsing the user’s profile.
sourcepub fn auth_cache_dir() -> Result<PathBuf, Error>
pub fn auth_cache_dir() -> Result<PathBuf, Error>
Returns a PathBuf
pointing to the imageboard’s authentication cache.
This is XDG-compliant and saves cache files to
$XDG_CONFIG_HOME/imageboard-downloader/<imageboard>
on Linux or
%APPDATA%/FerrahWolfeh/imageboard-downloader/<imageboard>
on Windows
Or you can set the env var IBDL_CACHE_DIR
to point it to a custom location.
Trait Implementations§
source§impl Clone for ImageBoards
impl Clone for ImageBoards
source§fn clone(&self) -> ImageBoards
fn clone(&self) -> ImageBoards
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ImageBoards
impl Debug for ImageBoards
source§impl<'de> Deserialize<'de> for ImageBoards
impl<'de> Deserialize<'de> for ImageBoards
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>,
source§impl Ord for ImageBoards
impl Ord for ImageBoards
source§fn cmp(&self, other: &ImageBoards) -> Ordering
fn cmp(&self, other: &ImageBoards) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ImageBoards
impl PartialEq for ImageBoards
source§fn eq(&self, other: &ImageBoards) -> bool
fn eq(&self, other: &ImageBoards) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ImageBoards
impl PartialOrd for ImageBoards
source§fn partial_cmp(&self, other: &ImageBoards) -> Option<Ordering>
fn partial_cmp(&self, other: &ImageBoards) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for ImageBoards
impl Serialize for ImageBoards
source§impl ToString for ImageBoards
impl ToString for ImageBoards
impl Copy for ImageBoards
impl Eq for ImageBoards
impl StructuralEq for ImageBoards
impl StructuralPartialEq for ImageBoards
Auto Trait Implementations§
impl RefUnwindSafe for ImageBoards
impl Send for ImageBoards
impl Sync for ImageBoards
impl Unpin for ImageBoards
impl UnwindSafe for ImageBoards
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.