pub struct PhantomBuilder { /* private fields */ }Expand description
Builder for establishing Phantom connections
Implementations§
Source§impl PhantomBuilder
impl PhantomBuilder
Sourcepub fn config(self, config: TransportConfig) -> Self
pub fn config(self, config: TransportConfig) -> Self
Set configuration
Sourcepub fn pin_server_key(self, key: HybridVerifyingKey) -> Self
pub fn pin_server_key(self, key: HybridVerifyingKey) -> Self
Pin a server’s public key for verification (TOFU alternative)
Sourcepub fn server_key(&self) -> Option<&HybridVerifyingKey>
pub fn server_key(&self) -> Option<&HybridVerifyingKey>
Get the expected server key
Sourcepub fn get_config(&self) -> &TransportConfig
pub fn get_config(&self) -> &TransportConfig
Get the configuration
Sourcepub fn create_client_handshake(&self) -> Result<HandshakeClient, HandshakeError>
pub fn create_client_handshake(&self) -> Result<HandshakeClient, HandshakeError>
Initiate a PQC handshake as client. Returns an error if the OS RNG cannot be read.
Sourcepub fn create_server_handshake() -> Result<HandshakeServer, HandshakeError>
pub fn create_server_handshake() -> Result<HandshakeServer, HandshakeError>
Create a server handshake handler. Returns an error if RNG / keygen fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PhantomBuilder
impl RefUnwindSafe for PhantomBuilder
impl Send for PhantomBuilder
impl Sync for PhantomBuilder
impl Unpin for PhantomBuilder
impl UnsafeUnpin for PhantomBuilder
impl UnwindSafe for PhantomBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more