pub struct ChapterInfo {
pub novel_id: Option<u32>,
pub id: u32,
pub title: String,
pub is_vip: Option<bool>,
pub price: Option<u16>,
pub payment_required: Option<bool>,
pub is_valid: Option<bool>,
pub word_count: Option<u32>,
pub create_time: Option<NaiveDateTime>,
pub update_time: Option<NaiveDateTime>,
}Expand description
Chapter information
Fields§
§novel_id: Option<u32>Novel id
id: u32Chapter id
title: StringChapter title
is_vip: Option<bool>Whether this chapter can only be read by VIP users
price: Option<u16>Chapter price
payment_required: Option<bool>Is the chapter accessible
is_valid: Option<bool>Is the chapter valid
word_count: Option<u32>Word count
create_time: Option<NaiveDateTime>Chapter creation time
update_time: Option<NaiveDateTime>Chapter last update time
Implementations§
Source§impl ChapterInfo
impl ChapterInfo
Sourcepub fn payment_required(&self) -> bool
pub fn payment_required(&self) -> bool
Is this chapter available
Sourcepub fn can_download(&self) -> bool
pub fn can_download(&self) -> bool
Is this chapter available for download
Trait Implementations§
Source§impl Debug for ChapterInfo
impl Debug for ChapterInfo
Source§impl Default for ChapterInfo
impl Default for ChapterInfo
Source§fn default() -> ChapterInfo
fn default() -> ChapterInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ChapterInfo
impl RefUnwindSafe for ChapterInfo
impl Send for ChapterInfo
impl Sync for ChapterInfo
impl Unpin for ChapterInfo
impl UnwindSafe for ChapterInfo
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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