renamed UriPath to RepoPath for clarity

Orual 42f14e72 87879fab

Changed files
+22 -22
crates
jacquard-common
+19 -19
crates/jacquard-common/src/types/aturi.rs
··· 31 31 pub authority: AtIdentifier<'this>, 32 32 #[borrows(uri)] 33 33 #[covariant] 34 - pub path: Option<UriPath<'this>>, 34 + pub path: Option<RepoPath<'this>>, 35 35 #[borrows(uri)] 36 36 #[covariant] 37 37 pub fragment: Option<CowStr<'this>>, ··· 58 58 } else { 59 59 None 60 60 }; 61 - Some(UriPath { collection, rkey }) 61 + Some(RepoPath { collection, rkey }) 62 62 } else { 63 63 None 64 64 } ··· 83 83 84 84 /// at:// URI path component (current subset) 85 85 #[derive(Clone, PartialEq, Eq, Hash, Debug)] 86 - pub struct UriPath<'u> { 86 + pub struct RepoPath<'u> { 87 87 pub collection: Nsid<'u>, 88 88 pub rkey: Option<RecordKey<Rkey<'u>>>, 89 89 } 90 90 91 - impl IntoStatic for UriPath<'_> { 92 - type Output = UriPath<'static>; 91 + impl IntoStatic for RepoPath<'_> { 92 + type Output = RepoPath<'static>; 93 93 94 94 fn into_static(self) -> Self::Output { 95 - UriPath { 95 + RepoPath { 96 96 collection: self.collection.into_static(), 97 97 rkey: self.rkey.map(|rkey| rkey.into_static()), 98 98 } 99 99 } 100 100 } 101 101 102 - pub type UriPathBuf = UriPath<'static>; 102 + pub type UriPathBuf = RepoPath<'static>; 103 103 104 104 pub static ATURI_REGEX: LazyLock<Regex> = LazyLock::new(|| { 105 105 // Fragment allows: / and \ and other special chars. In raw string, backslashes are literal. ··· 125 125 } else { 126 126 None 127 127 }; 128 - Some(UriPath { collection, rkey }) 128 + Some(RepoPath { collection, rkey }) 129 129 } else { 130 130 None 131 131 }; ··· 166 166 } else { 167 167 None 168 168 }; 169 - Some(UriPath { collection, rkey }) 169 + Some(RepoPath { collection, rkey }) 170 170 } else { 171 171 None 172 172 }; ··· 207 207 } else { 208 208 None 209 209 }; 210 - Some(UriPath { collection, rkey }) 210 + Some(RepoPath { collection, rkey }) 211 211 } else { 212 212 None 213 213 }; ··· 286 286 self.inner.borrow_authority() 287 287 } 288 288 289 - pub fn path(&self) -> &Option<UriPath<'_>> { 289 + pub fn path(&self) -> &Option<RepoPath<'_>> { 290 290 self.inner.borrow_path() 291 291 } 292 292 ··· 339 339 } else { 340 340 None 341 341 }; 342 - Some(UriPath { collection, rkey }) 342 + Some(RepoPath { collection, rkey }) 343 343 } else { 344 344 None 345 345 }; ··· 367 367 } else { 368 368 None 369 369 }; 370 - Some(UriPath { collection, rkey }) 370 + Some(RepoPath { collection, rkey }) 371 371 } else { 372 372 None 373 373 } ··· 418 418 } else { 419 419 None 420 420 }; 421 - Some(UriPath { collection, rkey }) 421 + Some(RepoPath { collection, rkey }) 422 422 } else { 423 423 None 424 424 }; ··· 470 470 } else { 471 471 None 472 472 }; 473 - Some(UriPath { collection, rkey }) 473 + Some(RepoPath { collection, rkey }) 474 474 } else { 475 475 None 476 476 }; ··· 498 498 } else { 499 499 None 500 500 }; 501 - Some(UriPath { collection, rkey }) 501 + Some(RepoPath { collection, rkey }) 502 502 } else { 503 503 None 504 504 } ··· 555 555 } else { 556 556 None 557 557 }; 558 - Some(UriPath { collection, rkey }) 558 + Some(RepoPath { collection, rkey }) 559 559 } else { 560 560 None 561 561 } ··· 646 646 } else { 647 647 None 648 648 }; 649 - Some(UriPath { collection, rkey }) 649 + Some(RepoPath { collection, rkey }) 650 650 } else { 651 651 None 652 652 }; ··· 672 672 } else { 673 673 None 674 674 }; 675 - Some(UriPath { collection, rkey }) 675 + Some(RepoPath { collection, rkey }) 676 676 } else { 677 677 None 678 678 }
+3 -3
crates/jacquard-common/src/types/collection.rs
··· 3 3 use serde::Serialize; 4 4 5 5 use crate::types::{ 6 - aturi::UriPath, 6 + aturi::RepoPath, 7 7 nsid::Nsid, 8 8 recordkey::{RecordKey, RecordKeyType, Rkey}, 9 9 }; ··· 42 42 /// [`Nsid`]: crate::types::string::Nsid 43 43 fn repo_path<'u, T: RecordKeyType>( 44 44 rkey: &'u crate::types::recordkey::RecordKey<T>, 45 - ) -> UriPath<'u> { 46 - UriPath { 45 + ) -> RepoPath<'u> { 46 + RepoPath { 47 47 collection: Self::nsid(), 48 48 rkey: Some(RecordKey::from(Rkey::raw(rkey.as_ref()))), 49 49 }