pub struct ClientBuilder<T: ReadWrite> { /* private fields */ }Expand description
Use this builder to construct a Client struct.
Implementations§
Source§impl<T: ReadWrite> ClientBuilder<T>
impl<T: ReadWrite> ClientBuilder<T>
Sourcepub fn new(stream: T) -> Self
pub fn new(stream: T) -> Self
Build a Client struct that will read/write from/to the given stream.
Creates a ClientBuilder which can be used to create a Client which will read/write from/to the given stream. The stream is expected to be a type which can read from and write to an established TCP connection to the KMIP server. In production the stream should also perform TLS de/encryption on the data read from/written to the stream.
The stream argument must implement the read and write traits which
the Client will use to read/write from/to the stream.
Sourcepub fn with_credentials(
self,
username: String,
password: Option<String>,
) -> Self
pub fn with_credentials( self, username: String, password: Option<String>, ) -> Self
Configure the Client to include username/password authentication credentials in KMIP requests, or the server to require requests to be authenticated with the given credentials.
Sourcepub fn with_max_message_size(self, max: i32) -> Self
pub fn with_max_message_size(self, max: i32) -> Self
Configure the Client or server to reject messages above a certain size.