pub struct Artifact<T> { /* private fields */ }Implementations§
Source§impl<T: Debug + DeserializeOwned + Send + Sync + 'static> Artifact<T>
impl<T: Debug + DeserializeOwned + Send + Sync + 'static> Artifact<T>
pub const fn new() -> Self
pub async fn init(&self, artifact_file: &str) -> Result<(), ArtifactError>
pub async fn get(&self) -> Result<RwLockReadGuard<'_, T>, ArtifactError>
pub async fn update(&self, new_data: T) -> Result<(), ArtifactError>
pub async fn watch( &self, artifact_file: String, interval_secs: u64, ) -> Result<(), ArtifactError>
Auto Trait Implementations§
impl<T> !Freeze for Artifact<T>
impl<T> !RefUnwindSafe for Artifact<T>
impl<T> Send for Artifact<T>where
T: Send,
impl<T> Sync for Artifact<T>
impl<T> Unpin for Artifact<T>where
T: Unpin,
impl<T> !UnwindSafe for Artifact<T>
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