Struct ClientConfigBuilder

Source
pub struct ClientConfigBuilder<TypedBuilderFields = ((HashSet<String>,), (), (), ())> { /* private fields */ }
Expand description

Builder for ClientConfig instances.

See ClientConfig::builder() for more info.

Implementations§

Source§

impl<__subscriptions, __app_name, __buffer_capacity> ClientConfigBuilder<(__subscriptions, (), __app_name, __buffer_capacity)>

Source

pub fn endpoint( self, endpoint: Uri, ) -> ClientConfigBuilder<(__subscriptions, (Uri,), __app_name, __buffer_capacity)>

Zeek WebSocket endpoint to connect to.

Source§

impl<__subscriptions, __endpoint, __buffer_capacity> ClientConfigBuilder<(__subscriptions, __endpoint, (), __buffer_capacity)>

Source

pub fn app_name( self, app_name: impl Into<String>, ) -> ClientConfigBuilder<(__subscriptions, __endpoint, (String,), __buffer_capacity)>

String use by the client to identify itself against Zeek.

Source§

impl<__subscriptions, __endpoint, __app_name> ClientConfigBuilder<(__subscriptions, __endpoint, __app_name, ())>

Source

pub fn buffer_capacity( self, buffer_capacity: usize, ) -> ClientConfigBuilder<(__subscriptions, __endpoint, __app_name, (usize,))>

How many events to buffer before exerting backpressure.

Source§

impl<__endpoint, __app_name, __buffer_capacity> ClientConfigBuilder<((HashSet<String>,), __endpoint, __app_name, __buffer_capacity)>

Source

pub fn subscribe<S: Into<String>>( self, topic: S, ) -> ClientConfigBuilder<((HashSet<String>,), __endpoint, __app_name, __buffer_capacity)>

Subscribe to topic to receive events.

Source§

impl<__buffer_capacity: Optional<usize>> ClientConfigBuilder<((HashSet<String>,), (Uri,), (String,), __buffer_capacity)>

Source

pub fn build(self) -> Result<Client, Error>

Finalise the builder and create its ClientConfig instance

Trait Implementations§

Source§

impl<TypedBuilderFields> Clone for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: Clone,

Source§

fn clone(&self) -> Self

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

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<TypedBuilderFields> Freeze for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: Freeze,

§

impl<TypedBuilderFields> RefUnwindSafe for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: RefUnwindSafe,

§

impl<TypedBuilderFields> Send for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: Send,

§

impl<TypedBuilderFields> Sync for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: Sync,

§

impl<TypedBuilderFields> Unpin for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: Unpin,

§

impl<TypedBuilderFields> UnwindSafe for ClientConfigBuilder<TypedBuilderFields>
where TypedBuilderFields: UnwindSafe,

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
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> Same for T

Source§

type Output = T

Should always be Self
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, 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