pub struct Config {
pub schema: String,
pub capacity: usize,
pub min_poll: Duration,
pub max_poll: Duration,
pub idle_poll: Duration,
pub stall_warning: Duration,
pub recent: usize,
pub trim_grace: Duration,
pub trim: Option<Trim>,
pub listen_url: Option<String>,
}Expand description
How the bus runs.
Fields§
§schema: StringThe schema holding the backlog; also the NOTIFY channel’s name.
capacity: usizeMessages a subscriber may fall behind the live feed before it catches up from the backlog instead.
min_poll: DurationHow often the listener looks again while committed messages wait
behind an older transaction (the delay doubles up to max_poll).
max_poll: Duration§idle_poll: DurationWithout a notification, the listener still looks this often.
stall_warning: DurationThe listener logs a warning (at most once a minute) when a committed message has waited longer than this behind an open transaction.
recent: usizeRecent messages each process keeps in memory, so subscribers resuming from a recent position catch up without a query.
trim_grace: DurationHow old a message must be before Bus::trim may delete it: longer
than any listener could still be behind. A subscriber whose position
is within a process’s recent ring is caught up from memory without a
gap check, which holds only if trim never deletes a message that
listener has not read yet.
trim: Option<Trim>The background trim: on by default with Trim’s defaults; None
leaves trimming to calls of Bus::trim.
listen_url: Option<String>Where the listener connects, when the pool goes through a pooler
in transaction mode (LISTEN needs a session of its own): a direct
or session-mode URL. None: the pool’s settings.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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