IngressBuilder

Struct IngressBuilder 

Source
pub struct IngressBuilder { /* private fields */ }
Expand description

Temporary struct for accumulating ingress configuration before finalizing it into a Ingress. This builder intends to apply validation only at meaningful states of the configuration, as opposed to every intermediary state.

Implementations§

Source§

impl IngressBuilder

Source

pub fn new() -> Self

Creates a new Ingress builder.

Source

pub fn with_name(self, name: impl AsRef<str>) -> Self

Recreates this ingress definition builder with the given name.

Source

pub fn with_exchange(self, exchange: Exchange) -> Self

Recreates this ingress definition builder with the given exchange.

Source

pub fn with_queue(self, queue: Queue) -> Self

Recreates this ingress definition builder with the given queue.

Source

pub fn with_queue_named(self, queue: impl AsRef<str>) -> Self

Recreates this ingress definition builder with a queue with the given name.

Source

pub fn with_durable(self, durable: bool) -> Self

Recreates this ingress definition builder with the given durable flag.

Source

pub fn with_exclusive(self, exclusive: bool) -> Self

Recreates this ingress definition builder with the given exclusive flag.

Source

pub fn with_auto_delete(self, auto_delete: bool) -> Self

Recreates this ingress definition builder with the given auto_delete flag.

Source

pub fn with_batch_size(self, batch_size: NonZeroUsize) -> Self

Recreates this ingress definition builder with the given batch size.

Source

pub fn with_batch_timeout(self, batch_timeout: Duration) -> Self

Recreates this ingress definition builder with the given batch timeout.

Source

pub fn with_prefetch_count(self, prefetch_count: Option<NonZeroU16>) -> Self

Recreates this ingress definition builder with the given prefetch count.

Source

pub fn with_acking_behavior(self, acking_behavior: AckingBehavior) -> Self

Recreates this ingress definition builder with the given acking behavior.

Source

pub fn with_gibberish_behavior( self, gibberish_behavior: FinalizationKind, ) -> Self

Recreates this ingress definition builder with the given gibberish behavior.

Source

pub fn with_binding_key(self, binding_key: impl Into<String>) -> Self

Recreates this ingress definition builder, adding the given binding key to the ones already included.

Source

pub fn with_replaced_binding_keys(self, binding_keys: HashSet<String>) -> Self

Recreates this ingress definition builder with the given binding keys.

This will replace any previously added binding keys.

Source

pub fn with_binding_header<V>(self, key: impl Into<String>, value: V) -> Self
where Header: From<V>,

Recreates this ingress definition builder, adding the given binding header to the ones already included.

Source

pub fn with_replaced_binding_headers( self, binding_headers: HashMap<String, Header>, ) -> Self

Recreates this ingress definition builder with the given binding headers.

This will replace any previously added binding headers.

Source

pub fn with_matching_all_headers(self) -> Self

Recreates this ingress definition builder with the headers matching behavior set to all (all headers must match).

Source

pub fn with_matching_any_headers(self) -> Self

Recreates this ingress definition builder with the headers matching behavior set to any (at least one header must match).

Source

pub fn with_headers_behavior( self, headers_behavior: HeadersMatchingBehavior, ) -> Self

Recreates this ingress definition builder with the given headers behavior.

Source

pub fn build(self) -> Result<Ingress, IngressError>

Finalizes the builder, validates its state, and, assuming valid state, returns the Ingress.

Trait Implementations§

Source§

impl Debug for IngressBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,