pub enum ChapterPosition {
Middle = 0,
First = 1,
Last = 2,
Unrecognized = -1,
}Expand description
Chapter position in the series chapters list group
This is a custom enum that does not exist originally in the API. Made to make it easier to understand the position of the chapter in the series.
Variants§
Middle = 0
Chapter located in the middle of the chapter list (usually need subs or tickets)
First = 1
Chapter located in first chapter list (usually free)
Last = 2
Chapter located in last chapter list (usually free)
Unrecognized = -1
An error has occurred.
Implementations§
Source§impl ChapterPosition
impl ChapterPosition
Sourcepub fn from_i32(value: i32) -> Option<ChapterPosition>
👎Deprecated: User the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<ChapterPosition>
Converts an i32 value to the corresponding ChapterPosition enum variant, returning the ChapterPosition::Unrecognized variant if it doesn’t match any variant.
Trait Implementations§
Source§impl Clone for ChapterPosition
impl Clone for ChapterPosition
Source§fn clone(&self) -> ChapterPosition
fn clone(&self) -> ChapterPosition
Returns a duplicate 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 ChapterPosition
impl Debug for ChapterPosition
Source§impl Default for ChapterPosition
impl Default for ChapterPosition
Source§impl From<ChapterPosition> for i32
impl From<ChapterPosition> for i32
Source§fn from(value: ChapterPosition) -> i32
fn from(value: ChapterPosition) -> i32
Converts to this type from the input type.
Source§impl Hash for ChapterPosition
impl Hash for ChapterPosition
Source§impl Ord for ChapterPosition
impl Ord for ChapterPosition
Source§fn cmp(&self, other: &ChapterPosition) -> Ordering
fn cmp(&self, other: &ChapterPosition) -> 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 ChapterPosition
impl PartialEq for ChapterPosition
Source§impl PartialOrd for ChapterPosition
impl PartialOrd for ChapterPosition
Source§impl TryFrom<i32> for ChapterPosition
impl TryFrom<i32> for ChapterPosition
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<ChapterPosition, UnknownEnumValue>
fn try_from(value: i32) -> Result<ChapterPosition, UnknownEnumValue>
Performs the conversion.
impl Copy for ChapterPosition
impl Eq for ChapterPosition
impl StructuralPartialEq for ChapterPosition
Auto Trait Implementations§
impl Freeze for ChapterPosition
impl RefUnwindSafe for ChapterPosition
impl Send for ChapterPosition
impl Sync for ChapterPosition
impl Unpin for ChapterPosition
impl UnwindSafe for ChapterPosition
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.