Skip to main content

ListTransactionsOptions

Struct ListTransactionsOptions 

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

Options for Admin::list_transactions.

Implementations§

Source§

impl ListTransactionsOptions

Source

pub fn new() -> Self

Creates default options: no filters, and filtered_duration_ms == -1 (no duration filtering), matching Java’s defaults.

Source

pub fn set_timeout_ms(self, timeout_ms: Option<i32>) -> Self

Set the timeout in milliseconds for this operation, or None if the default API timeout for the AdminClient should be used.

§Arguments
  • timeout_ms - the timeout in milliseconds, or None for the default API timeout.
§Returns

This ListTransactionsOptions instance.

Source

pub fn timeout_ms(&self) -> Option<i32>

Returns the timeout in milliseconds for this operation, or None if the default API timeout for the AdminClient should be used.

Source

pub fn filter_states( self, states: impl IntoIterator<Item = TransactionState>, ) -> Self

Filter only the transactions that are in a specific set of states. If no filter is specified or if the passed set of states is empty, then transactions in all states will be returned.

§Arguments
  • states - the set of states to filter by
§Returns

This ListTransactionsOptions instance.

Source

pub fn filter_producer_ids( self, producer_ids: impl IntoIterator<Item = i64>, ) -> Self

Filter only the transactions from producers in a specific set of producer ids. If no filter is specified or if the passed collection of producer ids is empty, then the transactions of all producer ids will be returned.

§Arguments
  • producer_ids - the set of producer ids to filter by
§Returns

This ListTransactionsOptions instance.

Source

pub fn filter_on_duration(self, duration_ms: i64) -> Self

Filter only the transactions that are running longer than the specified duration. If no filter is specified or if the passed duration ms is less than 0, then the all transactions will be returned.

§Arguments
  • duration_ms - the duration in milliseconds to filter by
§Returns

This ListTransactionsOptions instance.

Source

pub fn filter_on_transactional_id_pattern(self, pattern: Option<String>) -> Self

Filter only the transactions that match with the given transactional ID pattern. If the filter is None or if the passed string is empty, then all the transactions will be returned.

§Arguments
  • pattern - the transactional ID regular expression pattern to filter by
§Returns

This ListTransactionsOptions instance.

Source

pub fn filtered_states(&self) -> &HashSet<TransactionState>

Returns the set of states to be filtered or empty if no states have been specified.

§Returns

the current set of filtered states (empty means that no states are filtered and all transactions will be returned)

Source

pub fn filtered_producer_ids(&self) -> &HashSet<i64>

Returns the set of producer ids that are being filtered or empty if none have been specified.

§Returns

the current set of filtered producer ids (empty means that no producer ids are filtered and all transactions will be returned)

Source

pub fn filtered_duration(&self) -> i64

Returns the duration ms value being filtered.

§Returns

the current duration filter value in ms (negative value means transactions are not filtered by duration)

Source

pub fn filtered_transactional_id_pattern(&self) -> Option<&str>

Returns transactional ID being filtered.

§Returns

the current transactional ID pattern filter (empty means no transactional IDs are filtered and all transactions will be returned)

Trait Implementations§

Source§

impl Clone for ListTransactionsOptions

Source§

fn clone(&self) -> ListTransactionsOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ListTransactionsOptions

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for ListTransactionsOptions

Java’s new ListTransactionsOptions(); a derived Default would set filtered_duration_ms to 0 instead of Java’s -1L (the initializer of ListTransactionsOptions#filteredDuration), and Admin::list_transactions() uses it.

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Display for ListTransactionsOptions

Source§

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

Java’s toString(), the sets as Java’s [a, b] and an unset timeout or pattern as null.

Java prints its HashSets in hash order. That order is unspecified for the states, since an enum’s hash is its identity hash, so they print in declaration order. The producer ids print in ascending order, which is Java’s order for non-negative ids below the table size.

Source§

impl Hash for ListTransactionsOptions

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ListTransactionsOptions

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for ListTransactionsOptions

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<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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
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.
§

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

§

fn vzip(self) -> V