pub struct ClientConfig {Show 14 fields
pub readonly: bool,
pub agent_id: String,
pub hwid: Option<String>,
pub server: Url,
pub token: Option<MaskedString>,
pub heartbeat_timeout: u64,
pub one_c_home: Option<String>,
pub one_c_platform: Option<Platform>,
pub one_c_publish_dir: Option<String>,
pub minecraft_server: Option<String>,
pub minecraft_java_opts: Option<String>,
pub minimize_to_tray_on_close: Option<bool>,
pub minimize_to_tray_on_start: Option<bool>,
pub transport: TransportConfig,
/* private fields */
}
Fields§
§readonly: bool
§agent_id: String
§hwid: Option<String>
§server: Url
§token: Option<MaskedString>
§heartbeat_timeout: u64
§one_c_home: Option<String>
§one_c_platform: Option<Platform>
§one_c_publish_dir: Option<String>
§minecraft_server: Option<String>
§minecraft_java_opts: Option<String>
§minimize_to_tray_on_close: Option<bool>
§minimize_to_tray_on_start: Option<bool>
§transport: TransportConfig
Implementations§
Source§impl ClientConfig
impl ClientConfig
pub fn get_config_path(&self) -> &PathBuf
pub fn from_file(path: &PathBuf, readonly: bool) -> Result<Self>
pub fn get_config_dir(user_dir: bool) -> Result<PathBuf>
pub fn save(&self) -> Result<()>
pub fn load(cfg_name: &str, user_dir: bool, readonly: bool) -> Result<Self>
pub fn set(&mut self, key: &str, value: &str) -> Result<()>
pub fn get(&self, key: &str) -> Result<String>
pub fn get_all_options(&self) -> Vec<(String, String)>
pub fn validate(&self) -> Result<()>
pub fn get_hwid(&self) -> String
Source§impl ClientConfig
impl ClientConfig
pub fn get_option(&self, option: ConfigOption) -> Result<String>
pub fn set_option(&mut self, option: ConfigOption, value: &str) -> Result<()>
pub fn get_all_config_options(&self) -> Vec<(String, String)>
Trait Implementations§
Source§impl Clone for ClientConfig
impl Clone for ClientConfig
Source§fn clone(&self) -> ClientConfig
fn clone(&self) -> ClientConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 ClientConfig
impl Debug for ClientConfig
Source§impl Default for ClientConfig
impl Default for ClientConfig
Source§impl<'de> Deserialize<'de> for ClientConfig
impl<'de> Deserialize<'de> for ClientConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ClientConfig
impl PartialEq for ClientConfig
Source§impl Serialize for ClientConfig
impl Serialize for ClientConfig
impl Eq for ClientConfig
impl StructuralPartialEq for ClientConfig
Auto Trait Implementations§
impl Freeze for ClientConfig
impl RefUnwindSafe for ClientConfig
impl Send for ClientConfig
impl Sync for ClientConfig
impl Unpin for ClientConfig
impl UnwindSafe for ClientConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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 more