[][src]Struct naromat::entities::sentence::Sentence

pub struct Sentence { /* fields omitted */ }

Structure of novel sentence.

Sentences are defined below:

Methods

impl Sentence[src]

Implementation for novel sentence structure

pub fn new(sentence: &str) -> Self[src]

Constructor

Example

use naromat::entities::sentence::Sentence;

Sentence::new("我が輩は猫である。");

pub fn print(self)[src]

Print formatted sentence

Example

use naromat::entities::sentence::Sentence;

let sentence = Sentence::new("我が輩は猫である。");
sentence.print()

pub fn get(self) -> String[src]

Get string of formatted sentence

Example

use naromat::entities::sentence::Sentence;
let sentence = Sentence::new("我が[輩:.]は[猫:ねこ]である");
assert_eq!(sentence.get(), "我が|輩《・》は|猫《ねこ》である");

Auto Trait Implementations

impl Unpin for Sentence

impl Sync for Sentence

impl Send for Sentence

impl UnwindSafe for Sentence

impl RefUnwindSafe for Sentence

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]