pub struct InterfaceConfig {
pub interface: InterfaceInfo,
pub server: ServerInfo,
}Fields§
§interface: InterfaceInfoThe information to bring up the interface.
server: ServerInfoThe necessary contact information for the server.
Implementations§
Source§impl InterfaceConfig
impl InterfaceConfig
pub fn write_to( &self, target_file: &mut File, comments: bool, mode: Option<u32>, ) -> Result<(), Error>
pub fn write_to_path<P: AsRef<Path>>( &self, path: P, comments: bool, mode: Option<u32>, ) -> Result<(), WrappedIoError>
Sourcepub fn write_to_interface(
&self,
config_dir: &Path,
interface: &InterfaceName,
) -> Result<PathBuf, Error>
pub fn write_to_interface( &self, config_dir: &Path, interface: &InterfaceName, ) -> Result<PathBuf, Error>
Overwrites the config file if it already exists.
pub fn from_file<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn from_interface( config_dir: &Path, interface: &InterfaceName, ) -> Result<Self, Error>
pub fn get_path(config_dir: &Path, interface: &InterfaceName) -> PathBuf
Trait Implementations§
Source§impl Clone for InterfaceConfig
impl Clone for InterfaceConfig
Source§fn clone(&self) -> InterfaceConfig
fn clone(&self) -> InterfaceConfig
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 InterfaceConfig
impl Debug for InterfaceConfig
Source§impl<'de> Deserialize<'de> for InterfaceConfig
impl<'de> Deserialize<'de> for InterfaceConfig
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
Auto Trait Implementations§
impl Freeze for InterfaceConfig
impl RefUnwindSafe for InterfaceConfig
impl Send for InterfaceConfig
impl Sync for InterfaceConfig
impl Unpin for InterfaceConfig
impl UnwindSafe for InterfaceConfig
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