pub struct Config {
pub lang: Option<&'static str>,
pub tones: Vec<UserLibrary>,
pub tone_dirs: Vec<PathBuf>,
}Expand description
言語サーバーの設定。
Fields§
§lang: Option<&'static str>表示の言語(en・ja)。None なら環境変数、クライアントの locale、OS の言語の順で決める。
tones: Vec<UserLibrary>利用者の音色集(--tones・PIKOPIKO_TONES)。#include "@名前/種類" が読め、#include "@ の
補完にも出る。派生音源(--synth-def)は、serve_stdio より前に pikopiko::synth::derived へ
登録しておく(音源の一覧は最初の Server で固まる)。
tone_dirs: Vec<PathBuf>音色集のフォルダー(--tones・PIKOPIKO_TONES)。空でなければ、サーバーが動いている間、
中のファイルが変わったら読み直して、開いている文書を解析し直す(再起動は要らない)。
変わったかは stat(更新時刻と大きさ)だけで見て、要求・通知が来たとき(0.3 秒に 1 回まで)に確かめる。
Trait Implementations§
Auto Trait Implementations§
impl Forget for Config
impl Freeze for Config
impl Move for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more