pub struct ServerStorage { /* private fields */ }Implementations§
Source§impl ServerStorage
impl ServerStorage
pub fn new(path: PathBuf) -> Self
pub fn list(&self) -> Result<Vec<StoredServer>>
pub fn get(&self, id: Uuid) -> Result<Option<StoredServer>>
pub fn get_by_endpoint(&self, endpoint: &str) -> Result<Option<StoredServer>>
pub fn upsert(&self, server: StoredServer) -> Result<()>
pub fn remove(&self, id: Uuid) -> Result<bool>
pub fn reconcile( &self, live_endpoints: &HashSet<String>, ) -> Result<Vec<StoredServer>>
Auto Trait Implementations§
impl !Freeze for ServerStorage
impl RefUnwindSafe for ServerStorage
impl Send for ServerStorage
impl Sync for ServerStorage
impl Unpin for ServerStorage
impl UnsafeUnpin for ServerStorage
impl UnwindSafe for ServerStorage
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