pub struct ClientHelloBuilder<'a, 'b> { /* private fields */ }Expand description
Builds a ClientHello body in caller-owned storage.
Implementations§
Source§impl<'a, 'b> ClientHelloBuilder<'a, 'b>
impl<'a, 'b> ClientHelloBuilder<'a, 'b>
Sourcepub fn new(
buffer: &'a mut [u8],
legacy_version: TlsProtocolVersion,
random: &'b [u8; 32],
session_id: &'b [u8],
cipher_suites: &'b [u8],
compression_methods: &'b [u8],
extensions: Option<&'b [u8]>,
) -> Self
pub fn new( buffer: &'a mut [u8], legacy_version: TlsProtocolVersion, random: &'b [u8; 32], session_id: &'b [u8], cipher_suites: &'b [u8], compression_methods: &'b [u8], extensions: Option<&'b [u8]>, ) -> Self
Creates a builder from ordered, already encoded variable-length fields.
Sourcepub fn build(self) -> Result<ClientHello<'a>, TlsBuildError>
pub fn build(self) -> Result<ClientHello<'a>, TlsBuildError>
Validates all fields and capacity before writing the ClientHello body.
Auto Trait Implementations§
impl<'a, 'b> !UnwindSafe for ClientHelloBuilder<'a, 'b>
impl<'a, 'b> Freeze for ClientHelloBuilder<'a, 'b>
impl<'a, 'b> RefUnwindSafe for ClientHelloBuilder<'a, 'b>
impl<'a, 'b> Send for ClientHelloBuilder<'a, 'b>
impl<'a, 'b> Sync for ClientHelloBuilder<'a, 'b>
impl<'a, 'b> Unpin for ClientHelloBuilder<'a, 'b>
impl<'a, 'b> UnsafeUnpin for ClientHelloBuilder<'a, 'b>
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