pub struct ServerBuilder<T: ReadWrite> { /* private fields */ }Expand description
Use this builder to construct a Server struct.
Implementations§
Source§impl<T: ReadWrite> ServerBuilder<T>
impl<T: ReadWrite> ServerBuilder<T>
Sourcepub fn new(stream: T) -> Self
pub fn new(stream: T) -> Self
Build a Server struct that will read/write from/to the given stream.
Creates a ServerBuilder which can be used to create a Server 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 Server 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 Server 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 Server or server to reject messages above a certain size.