[][src]Struct pyphen_rs::Builder

pub struct Builder<T> { /* fields omitted */ }

Builder struct to create a hyphenation instance

Methods

impl Builder<Rc<String>>[src]

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

Constructs a new Builder for a given language

  • lang - lang of the included dict to use if no filename is given

impl<T> Builder<T>[src]

pub fn filename(filename: T) -> Self[src]

Constructs a new Builder for a given dictionary file

  • filename - filename of hyph_*.dic to read

pub fn left(&mut self, left: usize) -> &mut Self[src]

Sets the minimum number of characters in the first syllable

pub fn right(&mut self, right: usize) -> &mut Self[src]

Sets the minimum number of characters in the last syllable

pub fn cache(&mut self, cache: bool) -> &mut Self[src]

Sets whether to use a cached copy of the hyphenation patterns

impl<T> Builder<T> where
    T: Deref<Target = String>, 
[src]

pub fn build(&self) -> Result<Pyphen, ()>[src]

Create an hyphenation instance for given lang or filename.

Returns Err if the given lang or filename does not exist.

Auto Trait Implementations

impl<T> Send for Builder<T> where
    T: Send

impl<T> Sync for Builder<T> where
    T: Sync

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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