pub struct ProxyCore { /* private fields */ }Implementations§
Source§impl ProxyCore
impl ProxyCore
pub fn new() -> Result<Self, ProxyError>
Sourcepub fn with_data_dir(data_dir: &Path) -> Result<Self, ProxyError>
pub fn with_data_dir(data_dir: &Path) -> Result<Self, ProxyError>
Create a ProxyCore that reads/writes config from a custom data directory.
pub async fn entries(&self) -> Vec<ProxyEntry>
pub async fn reload(&self) -> Result<Vec<ProxyEntry>, ProxyError>
pub async fn upsert( &self, entry: ProxyEntry, ) -> Result<Vec<ProxyEntry>, ProxyError>
pub async fn remove(&self, name: &str) -> Result<Vec<ProxyEntry>, ProxyError>
Sourcepub fn subscribe(&self) -> Receiver<ProxyEvent>
pub fn subscribe(&self) -> Receiver<ProxyEvent>
Subscribe to proxy events.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ProxyCore
impl !UnwindSafe for ProxyCore
impl Freeze for ProxyCore
impl Send for ProxyCore
impl Sync for ProxyCore
impl Unpin for ProxyCore
impl UnsafeUnpin for ProxyCore
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