Skip to main content

GroupBuilder

Struct GroupBuilder 

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

Builder for constructing Group entries.

Use the BaseBuilderHost methods to populate optional fields, then call build().

Implementations§

Source§

impl GroupBuilder

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl BaseBuilderHost for GroupBuilder

Source§

fn hostname<S>(self, hostname: S) -> Self
where S: Into<String>,

Sets the hostname for the group.

§Parameters
  • hostname - A string-like value containing the hostname or IP address to assign to the group.
§Returns

Returns Self with the hostname field updated, allowing for method chaining.

Source§

fn port(self, port: u16) -> Self

Sets the connection port for the group.

§Parameters
  • port - A 16-bit unsigned integer representing the port number to use for connections.
§Returns

Returns Self with the port field updated, allowing for method chaining.

Source§

fn username<S>(self, username: S) -> Self
where S: Into<String>,

Sets the username for authentication.

§Parameters
  • username - A string-like value containing the username to use for authentication.
§Returns

Returns Self with the username field updated, allowing for method chaining.

Source§

fn password<S>(self, password: S) -> Self
where S: Into<String>,

Sets the password for authentication.

§Parameters
  • password - A string-like value containing the password to use for authentication.
§Returns

Returns Self with the password field updated, allowing for method chaining.

Source§

fn platform<S>(self, platform: S) -> Self
where S: Into<String>,

Sets the platform identifier for the group.

§Parameters
  • platform - A string-like value identifying the platform type (e.g., “linux”, “windows”, “cisco_ios”).
§Returns

Returns Self with the platform field updated, allowing for method chaining.

Source§

fn groups(self, groups: ParentGroups) -> Self

Sets the parent groups for this group.

§Parameters
  • groups - A ParentGroups instance containing the names of parent groups this group belongs to.
§Returns

Returns Self with the groups field updated, allowing for method chaining.

Source§

fn data(self, data: Data) -> Self

Sets arbitrary data for the group.

§Parameters
  • data - A Data instance containing arbitrary JSON data to associate with the group.
§Returns

Returns Self with the data field updated, allowing for method chaining.

Source§

fn connection_options<S>(self, name: S, options: ConnectionOptions) -> Self
where S: Into<String>,

Adds or updates connection-specific options for the group.

§Parameters
  • name - A string-like value identifying the connection plugin name (e.g., “ssh”, “netconf”).
  • options - A ConnectionOptions instance containing connection-specific configuration.
§Returns

Returns Self with the connection options updated, allowing for method chaining. If no connection options map exists, one is created before inserting the new options.

Source§

type Output = Group

Source§

fn build(self) -> Group

Builds the struct from the updated builder and returns final struct object.
Source§

impl Default for GroupBuilder

Source§

fn default() -> Self

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