pub struct ConfigFieldDef {
pub key: &'static str,
pub toml_path: &'static str,
pub value_type: ConfigValueType,
pub default_value: &'static str,
pub dynamic: bool,
pub reloadable: bool,
pub description: &'static str,
pub service: &'static str,
pub choices: &'static [&'static str],
}Expand description
配置字段定义
Fields§
§key: &'static strDot-separated key, e.g. “turn.realm”
toml_path: &'static strTOML navigation path, e.g. “turn.realm”
value_type: ConfigValueTypeValue type
default_value: &'static strDefault value (as string)
dynamic: boolCan be overridden via API at runtime
reloadable: boolTakes effect on SIGHUP reload (without restart)
description: &'static strHuman-readable description
service: &'static strService this field belongs to
choices: &'static [&'static str]Valid choices for Enum type (empty for other types)
Implementations§
Trait Implementations§
Source§impl Clone for ConfigFieldDef
impl Clone for ConfigFieldDef
Source§fn clone(&self) -> ConfigFieldDef
fn clone(&self) -> ConfigFieldDef
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigFieldDef
impl Debug for ConfigFieldDef
Auto Trait Implementations§
impl Freeze for ConfigFieldDef
impl RefUnwindSafe for ConfigFieldDef
impl Send for ConfigFieldDef
impl Sync for ConfigFieldDef
impl Unpin for ConfigFieldDef
impl UnsafeUnpin for ConfigFieldDef
impl UnwindSafe for ConfigFieldDef
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request