Struct grpcio::ServerCredentialsBuilder
source · [−]pub struct ServerCredentialsBuilder { /* private fields */ }
Expand description
ServerCredentials
factory in order to configure the properties.
Implementations
sourceimpl ServerCredentialsBuilder
impl ServerCredentialsBuilder
sourcepub fn new() -> ServerCredentialsBuilder
pub fn new() -> ServerCredentialsBuilder
Initialize a new ServerCredentialsBuilder
.
sourcepub fn root_cert<S: Into<Vec<u8>>>(
self,
cert: S,
cer_request_type: CertificateRequestType
) -> ServerCredentialsBuilder
pub fn root_cert<S: Into<Vec<u8>>>(
self,
cert: S,
cer_request_type: CertificateRequestType
) -> ServerCredentialsBuilder
Set the PEM encoded client root certificate to verify client’s identity. If
force_client_auth
is set to true
, the authenticity of client check will be enforced.
sourcepub fn add_cert(
self,
cert: Vec<u8>,
private_key: Vec<u8>
) -> ServerCredentialsBuilder
pub fn add_cert(
self,
cert: Vec<u8>,
private_key: Vec<u8>
) -> ServerCredentialsBuilder
Add a PEM encoded server side certificate and key.
sourcepub fn build(self) -> ServerCredentials
pub fn build(self) -> ServerCredentials
Finalize the ServerCredentialsBuilder
and build the ServerCredentials
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ServerCredentialsBuilder
impl !Send for ServerCredentialsBuilder
impl !Sync for ServerCredentialsBuilder
impl Unpin for ServerCredentialsBuilder
impl UnwindSafe for ServerCredentialsBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more