pub struct Chapter { /* private fields */ }Expand description
A single chapter information
Implementations§
Source§impl Chapter
impl Chapter
Sourcepub fn chapter_id(&self) -> u64
pub fn chapter_id(&self) -> u64
Chapter ID
Sourcepub fn published_at(&self) -> i64
pub fn published_at(&self) -> i64
Chapter published/start UNIX timestamp
Sourcepub fn vertical_only(&self) -> bool
pub fn vertical_only(&self) -> bool
Is the chapter can be read in vertical mode only?
Sourcepub fn horizontal_only(&self) -> bool
pub fn horizontal_only(&self) -> bool
Is the chapter can be read in horizontal mode only?
Sourcepub fn view_count(&self) -> u64
pub fn view_count(&self) -> u64
Chapter view count
Sourcepub fn comment_count(&self) -> u64
pub fn comment_count(&self) -> u64
Chapter comment count
Source§impl Chapter
impl Chapter
Sourcepub fn subtitle(&self) -> &str
pub fn subtitle(&self) -> &str
Returns the value of subtitle, or the default value if subtitle is unset.
Sourcepub fn end_at(&self) -> i64
pub fn end_at(&self) -> i64
Returns the value of end_at, or the default value if end_at is unset.
Sourcepub fn ticket_end_at(&self) -> i64
pub fn ticket_end_at(&self) -> i64
Returns the value of ticket_end_at, or the default value if ticket_end_at is unset.
Sourcepub fn position(&self) -> ChapterPosition
pub fn position(&self) -> ChapterPosition
Returns the enum value of position, or the default if the field is set to an invalid enum value.
Sourcepub fn set_position(&mut self, value: ChapterPosition)
pub fn set_position(&mut self, value: ChapterPosition)
Sets position to the provided enum value.
Source§impl Chapter
impl Chapter
Sourcepub fn is_ticketed(&self) -> bool
pub fn is_ticketed(&self) -> bool
Can this chapter be read with ticket?
Sourcepub fn default_view_mode(&self) -> &'static str
pub fn default_view_mode(&self) -> &'static str
Get the default viewing mode
Sourcepub fn as_chapter_title(&self) -> String
pub fn as_chapter_title(&self) -> String
Format the chapter title and subtitle into a single string.
If the subtitle is None, the title will be returned as is.
Trait Implementations§
Source§impl Message for Chapter
impl Message for Chapter
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.