pub struct FileUuidStorage { /* private fields */ }Expand description
File-based UUID storage implementation.
Stores UUID mappings in .ryo/uuid-mapping.json relative to the workspace root.
§Example
ⓘ
use ryo_storage::FileUuidStorage;
use ryo_analysis::UuidPersistence;
let storage = FileUuidStorage::new("/path/to/workspace");
// Load existing mappings
if let Some(mappings) = storage.load() {
println!("Loaded {} mappings", mappings.len());
}
// Save new mappings
let mut mappings = HashMap::new();
mappings.insert("test_crate::Foo".to_string(), "uuid-here".to_string());
storage.save(&mappings)?;Implementations§
Trait Implementations§
Source§impl Clone for FileUuidStorage
impl Clone for FileUuidStorage
Source§fn clone(&self) -> FileUuidStorage
fn clone(&self) -> FileUuidStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FileUuidStorage
impl Debug for FileUuidStorage
Auto Trait Implementations§
impl Freeze for FileUuidStorage
impl RefUnwindSafe for FileUuidStorage
impl Send for FileUuidStorage
impl Sync for FileUuidStorage
impl Unpin for FileUuidStorage
impl UnsafeUnpin for FileUuidStorage
impl UnwindSafe for FileUuidStorage
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more