pub struct RelayBuilder { /* private fields */ }
Expand description
Relay builder
Implementations§
Source§impl RelayBuilder
impl RelayBuilder
Sourcepub fn mode(self, mode: RelayBuilderMode) -> Self
pub fn mode(self, mode: RelayBuilderMode) -> Self
Set mode
Sourcepub fn rate_limit(self, limit: RateLimit) -> Self
pub fn rate_limit(self, limit: RateLimit) -> Self
Set rate limit
Sourcepub fn nip42(self, opts: RelayBuilderNip42) -> Self
pub fn nip42(self, opts: RelayBuilderNip42) -> Self
Require NIP42 authentication
Sourcepub fn max_connections(self, max: usize) -> Self
pub fn max_connections(self, max: usize) -> Self
Set number of max connections allowed
Sourcepub fn write_policy<T>(self, policy: T) -> Selfwhere
T: WritePolicy + 'static,
pub fn write_policy<T>(self, policy: T) -> Selfwhere
T: WritePolicy + 'static,
Add a write policy plugin
Sourcepub fn query_policy<T>(self, policy: T) -> Selfwhere
T: QueryPolicy + 'static,
pub fn query_policy<T>(self, policy: T) -> Selfwhere
T: QueryPolicy + 'static,
Add a query policy plugin
Trait Implementations§
Source§impl Debug for RelayBuilder
impl Debug for RelayBuilder
Auto Trait Implementations§
impl Freeze for RelayBuilder
impl !RefUnwindSafe for RelayBuilder
impl Send for RelayBuilder
impl Sync for RelayBuilder
impl Unpin for RelayBuilder
impl !UnwindSafe for RelayBuilder
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
Mutably borrows from an owned value. Read more