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
sourceimpl 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 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
sourcepub async fn read_config_from_fs(
&self
) -> Result<Option<ImageboardConfig>, AuthError>
pub async fn read_config_from_fs(
&self
) -> Result<Option<ImageboardConfig>, AuthError>
Reads and parses the authentication cache from the path provided by auth_cache_dir.
Returns None if the file is corrupted or does not exist.
Trait Implementations
sourceimpl Clone for ImageBoards
impl Clone for ImageBoards
sourcefn clone(&self) -> ImageBoards
fn clone(&self) -> ImageBoards
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresourceimpl Debug for ImageBoards
impl Debug for ImageBoards
sourceimpl<'de> Deserialize<'de> for ImageBoards
impl<'de> Deserialize<'de> for ImageBoards
sourcefn 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>,
sourceimpl Ord for ImageBoards
impl Ord for ImageBoards
sourcefn cmp(&self, other: &ImageBoards) -> Ordering
fn cmp(&self, other: &ImageBoards) -> Ordering
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialEq<ImageBoards> for ImageBoards
impl PartialEq<ImageBoards> for ImageBoards
sourcefn eq(&self, other: &ImageBoards) -> bool
fn eq(&self, other: &ImageBoards) -> bool
sourceimpl PartialOrd<ImageBoards> for ImageBoards
impl PartialOrd<ImageBoards> for ImageBoards
sourcefn partial_cmp(&self, other: &ImageBoards) -> Option<Ordering>
fn partial_cmp(&self, other: &ImageBoards) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresourceimpl Serialize for ImageBoards
impl Serialize for ImageBoards
sourceimpl 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.