pub struct AppState {Show 20 fields
pub store: Arc<HashtreeStore>,
pub auth: Option<AuthCredentials>,
pub webrtc_peers: Option<Arc<WebRTCState>>,
pub ws_relay: Arc<WsRelayState>,
pub max_upload_bytes: usize,
pub public_writes: bool,
pub allowed_pubkeys: HashSet<String>,
pub upstream_blossom: Vec<String>,
pub social_graph: Option<Arc<SocialGraphAccessControl>>,
pub social_graph_store: Option<Arc<dyn SocialGraphBackend>>,
pub social_graph_root: Option<[u8; 32]>,
pub socialgraph_snapshot_public: bool,
pub nostr_relay: Option<Arc<NostrRelay>>,
pub nostr_relay_urls: Vec<String>,
pub tree_root_cache: Arc<Mutex<HashMap<String, CachedTreeRootEntry>>>,
pub inflight_blob_fetches: Arc<Mutex<HashMap<String, Shared<BoxFuture<'static, bool>>>>>,
pub directory_listing_cache: Arc<Mutex<TimedLruCache<String, LookupResult<Vec<TreeEntry>>>>>,
pub resolved_path_cache: Arc<Mutex<TimedLruCache<String, LookupResult<CachedResolvedPathEntry>>>>,
pub thumbnail_path_cache: Arc<Mutex<TimedLruCache<String, LookupResult<String>>>>,
pub cid_size_cache: Arc<Mutex<TimedLruCache<String, LookupResult<u64>>>>,
}Fields§
§store: Arc<HashtreeStore>§auth: Option<AuthCredentials>§webrtc_peers: Option<Arc<WebRTCState>>WebRTC peer state for forwarding requests to connected P2P peers
ws_relay: Arc<WsRelayState>WebSocket relay state for /ws clients
max_upload_bytes: usizeMaximum upload size in bytes for Blossom uploads (default: 5 MB)
public_writes: boolAllow anyone with valid Nostr auth to write (default: true) When false, only allowed_pubkeys can write
allowed_pubkeys: HashSet<String>Pubkeys allowed to write (hex format, from config allowed_npubs)
upstream_blossom: Vec<String>Upstream Blossom servers for cascade fetching
Social graph access control
Social graph store handle for snapshot export
Social graph root pubkey bytes for snapshot export
Allow public access to social graph snapshot endpoint
nostr_relay: Option<Arc<NostrRelay>>Nostr relay state for /ws and WebRTC Nostr messages
nostr_relay_urls: Vec<String>Active upstream Nostr relays for HTTP resolver operations.
tree_root_cache: Arc<Mutex<HashMap<String, CachedTreeRootEntry>>>In-process cache for resolved mutable tree roots, keyed by npub/tree(+key)
inflight_blob_fetches: Arc<Mutex<HashMap<String, Shared<BoxFuture<'static, bool>>>>>Shared in-flight blob fetches so concurrent misses only hit upstream once per hash
directory_listing_cache: Arc<Mutex<TimedLruCache<String, LookupResult<Vec<TreeEntry>>>>>Immutable directory listings keyed by CID
resolved_path_cache: Arc<Mutex<TimedLruCache<String, LookupResult<CachedResolvedPathEntry>>>>Immutable resolved paths keyed by root CID + path
thumbnail_path_cache: Arc<Mutex<TimedLruCache<String, LookupResult<String>>>>Immutable thumbnail alias resolutions keyed by root CID + alias path
cid_size_cache: Arc<Mutex<TimedLruCache<String, LookupResult<u64>>>>Immutable file sizes keyed by CID
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl UnsafeUnpin for AppState
impl !UnwindSafe for AppState
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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