[−][src]Struct naromat::entities::chapter::Chapter
Structure of novel chapter.
Chapters are defined below:
- Starts from previous chapter or start of document
- End with next chapter or end of document
Methods
impl Chapter[src]
Implementation for novel chapter structure
pub fn new(text: &str) -> Self[src]
Constructor
Example
use naromat::entities::chapter::Chapter; Chapter::new(" 我が輩は猫である。名前はまだない。 どこで生まれたのかとんと検討がつかぬ。");
pub fn print(self)[src]
Print formatted chapter
Example
use naromat::entities::chapter::Chapter; let chapter = Chapter::new(" 我が輩は猫である。名前はまだない。 どこで[生まれた:.]のかとんと[見当:けんとう]がつかぬ。 "); chapter.print()
pub fn get(self) -> String[src]
Get string of formatted sentence
Example
use naromat::entities::chapter::Chapter; let chapter = Chapter::new(" 我が輩は猫である。名前はまだない。 どこで[生まれた:.]のかとんと[見当:けんとう]がつかぬ。 "); assert_eq!(chapter.get(), " 我が輩は猫である。名前はまだない。 どこで|生まれた《・・・・》のかとんと|見当《けんとう》がつかぬ。");
Auto Trait Implementations
impl Unpin for Chapter
impl Sync for Chapter
impl Send for Chapter
impl UnwindSafe for Chapter
impl RefUnwindSafe for Chapter
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,