Struct naromat::entities::line::Line [−][src]
Structure of novel line
Lines are defined below:
- Starts after breakline or chapter head
- End with breakline
Implementations
impl Line
[src]
Implementation of novel line structure
pub fn new(text: &str) -> Self
[src]
pub fn print(self)
[src]
Print formatted line
Example
use naromat::entities::line::Line; let line = Line::new("我が輩は猫である。名前はまだない。"); line.print()
pub fn get(self) -> String
[src]
Get string of formatted sentence
Example
use naromat::entities::line::Line; let line = Line::new("我が[輩:.]は[猫:ねこ]である。どこで生まれたかとんと見当がつかぬ。"); assert_eq!(line.get(), " 我が|輩《・》は|猫《ねこ》である。どこで生まれたかとんと見当がつかぬ。");
pub fn is_comment(text: &str) -> bool
[src]
Auto Trait Implementations
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnwindSafe for Line
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
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.
pub 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>,