pub enum ScrapeSource {
HackerNews,
Slashdot,
Lobsters,
Reddit,
Feed,
Other,
}
Variants§
Implementations§
Source§impl ScrapeSource
impl ScrapeSource
pub fn into_str(&self) -> &'static str
pub fn try_from_str(s: &str) -> Option<Self>
pub const fn all() -> &'static [ScrapeSource]
pub fn comments_url(&self, id: &str, subsource: Option<&str>) -> String
pub fn id_from_comments_url(&self, url: &str) -> Option<ScrapeId>
pub fn is_comments_host(&self, host: &str) -> bool
pub fn id<'a, ID: Clone + Into<Cow<'a, str>>>(&self, id: ID) -> ScrapeId
pub fn subsource_id<'a, ID: Clone + Into<Cow<'a, str>>>( &self, subsource: ID, id: ID, ) -> ScrapeId
Trait Implementations§
Source§impl Clone for ScrapeSource
impl Clone for ScrapeSource
Source§fn clone(&self) -> ScrapeSource
fn clone(&self) -> ScrapeSource
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ScrapeSource
impl Debug for ScrapeSource
Source§impl<'de> Deserialize<'de> for ScrapeSource
impl<'de> Deserialize<'de> for ScrapeSource
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
Source§impl Hash for ScrapeSource
impl Hash for ScrapeSource
Source§impl Ord for ScrapeSource
impl Ord for ScrapeSource
Source§fn cmp(&self, other: &ScrapeSource) -> Ordering
fn cmp(&self, other: &ScrapeSource) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ScrapeSource
impl PartialEq for ScrapeSource
Source§impl PartialOrd for ScrapeSource
impl PartialOrd for ScrapeSource
Source§impl Serialize for ScrapeSource
impl Serialize for ScrapeSource
impl Copy for ScrapeSource
impl Eq for ScrapeSource
impl StructuralPartialEq for ScrapeSource
Auto Trait Implementations§
impl Freeze for ScrapeSource
impl RefUnwindSafe for ScrapeSource
impl Send for ScrapeSource
impl Sync for ScrapeSource
impl Unpin for ScrapeSource
impl UnwindSafe for ScrapeSource
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more