pub struct ChapterViewer { /* private fields */ }Expand description
A chapter viewer response
Implementations§
Source§impl ChapterViewer
impl ChapterViewer
Sourcepub fn pages(&self) -> &[ChapterPageResponse]
pub fn pages(&self) -> &[ChapterPageResponse]
Chapter pages
Sourcepub fn chapter_id(&self) -> u64
pub fn chapter_id(&self) -> u64
Chapter ID
Sourcepub fn chapter_title(&self) -> &str
pub fn chapter_title(&self) -> &str
Chapter title
Sourcepub fn comment_count(&self) -> u64
pub fn comment_count(&self) -> u64
Number of comments
Sourcepub fn vertical_only(&self) -> bool
pub fn vertical_only(&self) -> bool
Is vertical only?
Sourcepub fn first_page_right(&self) -> bool
pub fn first_page_right(&self) -> bool
Is the first page on the right side (first page is odd number)
Sourcepub fn region_code(&self) -> &str
pub fn region_code(&self) -> &str
Region code of the title
Sourcepub fn horizontal_only(&self) -> bool
pub fn horizontal_only(&self) -> bool
Is horizontal only?
Sourcepub fn user_subscription(&self) -> Option<&UserSubscription>
pub fn user_subscription(&self) -> Option<&UserSubscription>
User subscription info
Source§impl ChapterViewer
impl ChapterViewer
Sourcepub fn plan_type(&self) -> SubscriptionPlan
pub fn plan_type(&self) -> SubscriptionPlan
Get the actual subscriptions plan type
This will return the actual SubscriptionPlan type
and fallback to SubscriptionPlan::Basic if the plan is not recognized.
Trait Implementations§
Source§impl Clone for ChapterViewer
impl Clone for ChapterViewer
Source§fn clone(&self) -> ChapterViewer
fn clone(&self) -> ChapterViewer
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 ChapterViewer
impl Debug for ChapterViewer
Source§impl Default for ChapterViewer
impl Default for ChapterViewer
Source§impl Message for ChapterViewer
impl Message for ChapterViewer
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
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,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
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,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
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,
Decodes a length-delimited instance of the message from the buffer.
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,
Decodes an instance of the message from a buffer, and merges it into
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,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl PartialEq for ChapterViewer
impl PartialEq for ChapterViewer
impl StructuralPartialEq for ChapterViewer
Auto Trait Implementations§
impl Freeze for ChapterViewer
impl RefUnwindSafe for ChapterViewer
impl Send for ChapterViewer
impl Sync for ChapterViewer
impl Unpin for ChapterViewer
impl UnwindSafe for ChapterViewer
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