pub struct HashtreeServer { /* private fields */ }Implementations§
Source§impl HashtreeServer
impl HashtreeServer
pub fn new(store: Arc<HashtreeStore>, addr: String) -> Self
Sourcepub fn with_max_upload_bytes(self, bytes: usize) -> Self
pub fn with_max_upload_bytes(self, bytes: usize) -> Self
Set maximum upload size for Blossom uploads
Sourcepub fn with_public_writes(self, public: bool) -> Self
pub fn with_public_writes(self, public: bool) -> Self
Set whether to allow public writes (anyone with valid Nostr auth) When false, only social graph members can write
Sourcepub fn with_webrtc_peers(self, webrtc_state: Arc<WebRTCState>) -> Self
pub fn with_webrtc_peers(self, webrtc_state: Arc<WebRTCState>) -> Self
Set WebRTC state for P2P peer queries
pub fn with_auth(self, username: String, password: String) -> Self
Sourcepub fn with_allowed_pubkeys(self, pubkeys: HashSet<String>) -> Self
pub fn with_allowed_pubkeys(self, pubkeys: HashSet<String>) -> Self
Set allowed pubkeys for blossom write access (hex format)
Sourcepub fn with_upstream_blossom(self, servers: Vec<String>) -> Self
pub fn with_upstream_blossom(self, servers: Vec<String>) -> Self
Set upstream Blossom servers for cascade fetching
Set social graph access control
Configure social graph snapshot export (store handle + root)
Sourcepub fn with_nostr_relay(self, relay: Arc<NostrRelay>) -> Self
pub fn with_nostr_relay(self, relay: Arc<NostrRelay>) -> Self
Set Nostr relay state (shared for /ws and WebRTC)
Sourcepub fn with_nostr_relay_urls(self, relays: Vec<String>) -> Self
pub fn with_nostr_relay_urls(self, relays: Vec<String>) -> Self
Set active upstream Nostr relays for HTTP resolver operations.
Sourcepub fn with_extra_routes(self, routes: Router<AppState>) -> Self
pub fn with_extra_routes(self, routes: Router<AppState>) -> Self
Merge extra routes into the daemon router (e.g. Tauri embeds /nip07).
Sourcepub fn with_cors(self, cors: CorsLayer) -> Self
pub fn with_cors(self, cors: CorsLayer) -> Self
Apply a CORS layer to all routes (used by embedded clients like Tauri).
pub async fn run(self) -> Result<()>
pub async fn run_with_listener(self, listener: TcpListener) -> Result<u16>
pub fn addr(&self) -> &str
Auto Trait Implementations§
impl !Freeze for HashtreeServer
impl !RefUnwindSafe for HashtreeServer
impl Send for HashtreeServer
impl Sync for HashtreeServer
impl Unpin for HashtreeServer
impl UnsafeUnpin for HashtreeServer
impl !UnwindSafe for HashtreeServer
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
Mutably borrows from an owned value. Read more
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>
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