pub struct Table {
    pub origin: Origin,
    /* private fields */
}
Expand description

一文字から一文字の置換テーブルを定義する構造体です。

Fields

origin: Origin

一文字から一文字の置換テーブルを定義している場所を指定します。

Implementations

Table 構造体を初期化します。

use chanoma::Table;

let table = Table::new();

TableBuilder を初期化して返します。

use chanoma::Table;

let table = Table::new().builder();

置換テーブルに Correspondence を登録します。

use chanoma::{Correspondence, Synthesized, Table, table::Origin};

let corr: Correspondence<Synthesized> = Correspondence::default();
let table = Table::from_corr(corr, Origin::New);

置換テーブルに Correspondence を追加します。

use chanoma::{Correspondence, Synthesized, Table};

let mut table = Table::new();
let corr: Correspondence<Synthesized> = Correspondence::default();
table.add(&corr);

置換テーブルに登録されている Correspondence を削除します。

use chanoma::{Correspondence, Synthesized, Table};

let mut table = Table::new();
let corr: Correspondence<Synthesized> = Correspondence::default();
table.remove(&corr);

置換テーブルに登録されている Correspondence を返します。

use chanoma::{Correspondence, Synthesized, Table};

let table = Table::new();
println!("{:?}", table.corr());

置換テーブルに登録されている Item を返します。

use chanoma::Table;

let table = Table::new();
println!("{:?}", table.items());

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.