pub struct Unit { /* private fields */ }Implementations§
Source§impl Unit
impl Unit
pub fn new( rules: Vec<Rule>, auth: Option<AuthConfig>, proxy: Option<ProxyConfig>, ) -> Self
pub fn add_rule(&mut self, rule: Rule)
pub fn set_auth(&mut self, auth: AuthConfig)
pub fn set_timeout_config(&mut self, config: TimeoutConfig)
pub fn timeout_config_mut(&mut self) -> &mut Option<TimeoutConfig>
pub fn redirect(&self, input: &str) -> RedirectResult
pub fn direct_http_addr(&self, input: &HttpResource) -> Option<HttpResource>
pub fn direct_git_addr(&self, input: &GitRepository) -> Option<GitRepository>
pub fn make_example() -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Unit
impl<'de> Deserialize<'de> for Unit
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
impl StructuralPartialEq for Unit
Auto Trait Implementations§
impl Freeze for Unit
impl RefUnwindSafe for Unit
impl Send for Unit
impl Sync for Unit
impl Unpin for Unit
impl UnsafeUnpin for Unit
impl UnwindSafe for Unit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ConfigIO<T> for Twhere
T: DeserializeOwned + Serialize,
impl<T> ConfigIO<T> for Twhere
T: DeserializeOwned + Serialize,
fn load_conf(path: &Path) -> Result<T, StructError<ConfIOReason>>
fn save_conf(&self, path: &Path) -> Result<(), StructError<ConfIOReason>>
Source§impl<T> ConfigLifecycle for T
impl<T> ConfigLifecycle for T
Source§fn load(path: &str) -> Result<T, StructError<ConfIOReason>>where
T: Sized,
fn load(path: &str) -> Result<T, StructError<ConfIOReason>>where
T: Sized,
强制加载配置文件
Source§fn init(&self, path: &str) -> Result<(), StructError<ConfIOReason>>where
T: Sized,
fn init(&self, path: &str) -> Result<(), StructError<ConfIOReason>>where
T: Sized,
初始化配置文件
Source§fn safe_clean(path: &str) -> Result<(), StructError<ConfIOReason>>
fn safe_clean(path: &str) -> Result<(), StructError<ConfIOReason>>
安全清理配置文件