An ATProtocol powered blogging engine.

refactor: reducing visibility

Signed-off-by: Nick Gerakines <nick.gerakines@gmail.com>

Changed files
+7 -7
src
+4 -4
src/identity.rs
··· 66 66 } 67 67 68 68 /// A variant that works with DidDocumentStorage instead of IdentityStorage 69 - pub struct CachingDidDocumentResolver<T: DidDocumentStorage + ?Sized> { 69 + pub(crate) struct CachingDidDocumentResolver<T: DidDocumentStorage + ?Sized> { 70 70 /// The underlying identity resolver to use when cache misses occur 71 71 resolver: IdentityResolver, 72 72 /// The storage implementation to use for caching ··· 75 75 76 76 impl<T: DidDocumentStorage + ?Sized> CachingDidDocumentResolver<T> { 77 77 /// Create a new caching identity resolver with the given resolver and storage. 78 - pub fn new(resolver: IdentityResolver, storage: Arc<T>) -> Self { 78 + pub(crate) fn new(resolver: IdentityResolver, storage: Arc<T>) -> Self { 79 79 Self { resolver, storage } 80 80 } 81 81 82 82 /// Resolve a DID to a Document, using the cache when possible. 83 - pub async fn resolve(&self, did: &str) -> Result<Document> { 83 + pub(crate) async fn resolve(&self, did: &str) -> Result<Document> { 84 84 // First, try to get the document from storage 85 85 if let Some(document) = self.storage.get_document_by_did(did).await? { 86 86 return Ok(document); ··· 96 96 } 97 97 98 98 /// Resolve a handle to a Document, using the cache when possible. 99 - pub async fn resolve_handle(&self, handle: &str) -> Result<Document> { 99 + pub(crate) async fn resolve_handle(&self, handle: &str) -> Result<Document> { 100 100 // For handle resolution, we need to resolve first since DidDocumentStorage 101 101 // doesn't have a get_by_handle method 102 102 let document = self.resolver.resolve(handle).await?;
+1 -1
src/process.rs
··· 421 421 } 422 422 423 423 /// Creates a post prefix lookup hashmap with external URL prefixes mapped to AT-URIs 424 - pub async fn post_prefix_lookup(&self) -> Result<HashMap<String, String>> { 424 + async fn post_prefix_lookup(&self) -> Result<HashMap<String, String>> { 425 425 // Check if we have a cached value 426 426 { 427 427 let guard = self.post_prefix_cache.read().await;
+2 -2
src/render.rs
··· 45 45 } 46 46 } 47 47 48 - pub fn with_theme(theme: &str, external_base: &str) -> Self { 48 + fn with_theme(theme: &str, external_base: &str) -> Self { 49 49 let syntect_adapter = Arc::new(SyntectAdapterBuilder::new().theme(theme).build()); 50 50 51 51 let mut options = Options::default(); ··· 65 65 } 66 66 } 67 67 68 - pub fn with_css(external_base: &str) -> Self { 68 + fn with_css(external_base: &str) -> Self { 69 69 let syntect_adapter = Arc::new(SyntectAdapterBuilder::new().css().build()); 70 70 71 71 let mut options = Options::default();