rusteron_code_gen

Struct ChannelUriBuilder

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

Builder for constructing Aeron URIs.

Implementations§

Source§

impl ChannelUriBuilder

Source

pub fn new() -> Self

Create a new builder.

Source

pub fn prefix(self, prefix: &str) -> Self

Set the prefix (e.g., “aeron-spy”).

Source

pub fn media(self, media: Media) -> Self

Set the media type.

Source

pub fn endpoint(self, endpoint: &str) -> Self

Set the endpoint (address:port).

Source

pub fn network_interface(self, network_interface: &str) -> Self

Set the network interface.

Source

pub fn control_endpoint(self, control_endpoint: &str) -> Self

Set the control endpoint (address:port).

Source

pub fn control_mode(self, control_mode: ControlMode) -> Self

Set the control mode.

Source

pub fn tags(self, tags: &str) -> Self

Set tags for the channel.

Source

pub fn reliable(self, reliable: bool) -> Self

Set the reliable flag.

Source

pub fn ttl(self, ttl: u8) -> Self

Set the Time To Live (TTL).

Source

pub fn mtu(self, mtu: u32) -> Self

Set the Maximum Transmission Unit (MTU).

Source

pub fn term_length(self, term_length: u32) -> Self

Set the term length.

Source

pub fn initial_term_id(self, initial_term_id: i32) -> Self

Set the initial term ID.

Source

pub fn term_id(self, term_id: i32) -> Self

Set the term ID.

Source

pub fn term_offset(self, term_offset: u32) -> Self

Set the term offset.

Source

pub fn session_id(self, session_id: i32) -> Self

Set the session ID.

Source

pub fn linger(self, linger: u64) -> Self

Set the linger timeout.

Source

pub fn sparse(self, sparse: bool) -> Self

Set the sparse flag.

Source

pub fn add_param(self, key: &str, value: &str) -> Self

Add a custom parameter to the URI.

Source

pub fn build(self) -> Result<String, String>

Build the Aeron URI as a string.

Trait Implementations§

Source§

impl Debug for ChannelUriBuilder

Source§

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

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

impl Default for ChannelUriBuilder

Source§

fn default() -> ChannelUriBuilder

Returns the “default value” for a type. 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<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, 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
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.