pub struct FipsEndpointBuilder { /* private fields */ }Expand description
Builder for an embedded FIPS endpoint.
Implementations§
Source§impl FipsEndpointBuilder
impl FipsEndpointBuilder
Sourcepub fn identity_nsec(self, nsec: impl Into<String>) -> Self
pub fn identity_nsec(self, nsec: impl Into<String>) -> Self
Use an nsec or hex secret for the endpoint identity.
Sourcepub fn discovery_scope(self, scope: impl Into<String>) -> Self
pub fn discovery_scope(self, scope: impl Into<String>) -> Self
Set an application-level discovery scope.
When the builder owns the default empty connectivity config, this also
enables scoped Nostr discovery, open same-scope peer discovery, local
LAN candidates, host-wide loopback rendezvous, and a UDP NAT advert.
If an explicit transport or Nostr config was supplied, the explicit
config is left in control and the scope is retained as endpoint
metadata; call Self::local_rendezvous to opt that endpoint into
same-host composition.
Sourcepub fn local_rendezvous(self) -> Self
pub fn local_rendezvous(self) -> Self
Enable host-wide authenticated loopback composition.
Sourcepub fn local_role(self, name: impl Into<String>, priority: i16) -> Self
pub fn local_role(self, name: impl Into<String>, priority: i16) -> Self
Advertise a portless same-host role, such as nostr.pubsub/1.
Empty, oversized, and excess names are ignored.
Sourcepub fn without_system_tun(self) -> Self
pub fn without_system_tun(self) -> Self
Disable FIPS-owned TUN and DNS system integration.
Sourcepub fn packet_channel_capacity(self, capacity: usize) -> Self
pub fn packet_channel_capacity(self, capacity: usize) -> Self
Set the app packet/data channel capacity.
Sourcepub async fn bind(self) -> Result<FipsEndpoint, FipsEndpointError>
pub async fn bind(self) -> Result<FipsEndpoint, FipsEndpointError>
Bind and start the embedded endpoint.
Sourcepub async fn bind_with_direct_receiver(
self,
) -> Result<(FipsEndpoint, FipsEndpointDirectReceiver), FipsEndpointError>
pub async fn bind_with_direct_receiver( self, ) -> Result<(FipsEndpoint, FipsEndpointDirectReceiver), FipsEndpointError>
Bind with a bounded receiver for direct dataplane endpoint packet runs.
Sourcepub async fn bind_with_direct_sink<S>(
self,
sink: S,
) -> Result<FipsEndpoint, FipsEndpointError>where
S: FipsEndpointDirectSink,
pub async fn bind_with_direct_sink<S>(
self,
sink: S,
) -> Result<FipsEndpoint, FipsEndpointError>where
S: FipsEndpointDirectSink,
Bind and start the endpoint with a direct dataplane endpoint-data sink.
Decrypted dataplane endpoint output is delivered to sink synchronously from
the dataplane output path. Generic endpoint events, including loopback sends
and non-dataplane delivery, continue to use the regular receive queue.
Trait Implementations§
Source§impl Clone for FipsEndpointBuilder
impl Clone for FipsEndpointBuilder
Source§fn clone(&self) -> FipsEndpointBuilder
fn clone(&self) -> FipsEndpointBuilder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FipsEndpointBuilder
impl Debug for FipsEndpointBuilder
Auto Trait Implementations§
impl Freeze for FipsEndpointBuilder
impl RefUnwindSafe for FipsEndpointBuilder
impl Send for FipsEndpointBuilder
impl Sync for FipsEndpointBuilder
impl Unpin for FipsEndpointBuilder
impl UnsafeUnpin for FipsEndpointBuilder
impl UnwindSafe for FipsEndpointBuilder
Blanket Implementations§
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