pub struct ServerConfig {Show 14 fields
pub bind_address: String,
pub enable_auth: bool,
pub stun_port: u16,
pub enable_webrtc: bool,
pub enable_multicast: bool,
pub multicast_group: String,
pub multicast_port: u16,
pub max_multicast_peers: usize,
pub enable_wifi_aware: bool,
pub max_wifi_aware_peers: usize,
pub enable_bluetooth: bool,
pub max_bluetooth_peers: usize,
pub public_writes: bool,
pub socialgraph_snapshot_public: bool,
}Fields§
§bind_address: String§enable_auth: bool§stun_port: u16Port for the built-in STUN server (0 = disabled)
enable_webrtc: boolEnable WebRTC P2P connections
enable_multicast: boolEnable LAN multicast discovery/signaling for native peers.
multicast_group: StringIPv4 multicast group used for LAN discovery/signaling.
multicast_port: u16UDP port used for LAN multicast discovery/signaling.
max_multicast_peers: usizeMaximum peers admitted from LAN multicast discovery. Set to 0 to disable multicast even when enable_multicast is true.
enable_wifi_aware: boolEnable Android Wi-Fi Aware nearby discovery/signaling for native peers.
max_wifi_aware_peers: usizeMaximum peers admitted from Wi-Fi Aware discovery. Set to 0 to disable Wi-Fi Aware even when enable_wifi_aware is true.
enable_bluetooth: boolEnable native Bluetooth discovery/transport for nearby peers.
max_bluetooth_peers: usizeMaximum peers admitted from Bluetooth discovery. Set to 0 to disable Bluetooth even when enable_bluetooth is true.
public_writes: boolAllow anyone with valid Nostr auth to write (default: true) When false, only social graph members can write
Allow public access to social graph snapshot endpoint (default: false)
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Source§fn clone(&self) -> ServerConfig
fn clone(&self) -> ServerConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ServerConfig
impl Debug for ServerConfig
Source§impl Default for ServerConfig
impl Default for ServerConfig
Source§impl<'de> Deserialize<'de> for ServerConfig
impl<'de> Deserialize<'de> for ServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for ServerConfig
impl RefUnwindSafe for ServerConfig
impl Send for ServerConfig
impl Sync for ServerConfig
impl Unpin for ServerConfig
impl UnsafeUnpin for ServerConfig
impl UnwindSafe for ServerConfig
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