Skip to main content

LanguagePackCommand

Enum LanguagePackCommand 

Source
pub enum LanguagePackCommand {
    Status {
        cache_dir: Option<PathBuf>,
    },
    Import {
        dir: PathBuf,
        cache_dir: Option<PathBuf>,
        pack_version: String,
        source: String,
        profile: Option<String>,
    },
    Update {
        endpoint: String,
        cache_dir: Option<PathBuf>,
        timeout_ms: u64,
        lang: Option<String>,
    },
}

Variants§

§

Status

查看本地语言包 cache / fallback 状态

Fields

§cache_dir: Option<PathBuf>

语言包 cache 根目录;默认按 OS cache dir 或 FUTU_LANGUAGE_PACK_CACHE_DIR

§

Import

从本地 Languages 目录导入 api_lang.ini / static_lang.ini

Fields

§dir: PathBuf

包含 en/zh_cn 子目录的 Languages 根目录

§cache_dir: Option<PathBuf>

语言包 cache 根目录;默认按 OS cache dir 或 FUTU_LANGUAGE_PACK_CACHE_DIR

§pack_version: String

写入 manifest 的语言包版本

§source: String

写入 manifest 的来源说明

§profile: Option<String>

可选 profile/client_type 说明;仅用于复盘,不参与协议

§

Update

从显式配置的 HTTPS endpoint 拉取语言包 manifest 并更新 last-good

Fields

§endpoint: String

manifest URL 或 endpoint 根目录。默认不配置、不联网

§cache_dir: Option<PathBuf>

语言包 cache 根目录;默认按 OS cache dir 或 FUTU_LANGUAGE_PACK_CACHE_DIR

§timeout_ms: u64

HTTP 超时,单位毫秒

§lang: Option<String>

可选语言过滤,逗号分隔:en,zh_cn

Trait Implementations§

Source§

impl FromArgMatches for LanguagePackCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for LanguagePackCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self via [FromArgMatches::from_arg_matches_mut] Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate self via [FromArgMatches::update_from_arg_matches_mut] Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more