Struct rustls::conn::ConnectionCore
source · pub(crate) struct ConnectionCore<Data> {
pub(crate) state: Result<Box<dyn State<Data>>, Error>,
pub(crate) data: Data,
pub(crate) common_state: CommonState,
pub(crate) message_deframer: MessageDeframer,
}
Fields§
§state: Result<Box<dyn State<Data>>, Error>
§data: Data
§common_state: CommonState
§message_deframer: MessageDeframer
Implementations§
source§impl<Data> ConnectionCore<Data>
impl<Data> ConnectionCore<Data>
pub(crate) fn new( state: Box<dyn State<Data>>, data: Data, common_state: CommonState, ) -> Self
pub(crate) fn process_new_packets(&mut self) -> Result<IoState, Error>
sourcefn deframe(
&mut self,
state: Option<&dyn State<Data>>,
) -> Result<Option<PlainMessage>, Error>
fn deframe( &mut self, state: Option<&dyn State<Data>>, ) -> Result<Option<PlainMessage>, Error>
Pull a message out of the deframer and send any messages that need to be sent as a result.
fn process_msg( &mut self, msg: PlainMessage, state: Box<dyn State<Data>>, ) -> Result<Box<dyn State<Data>>, Error>
pub(crate) fn export_keying_material<T: AsMut<[u8]>>( &self, output: T, label: &[u8], context: Option<&[u8]>, ) -> Result<T, Error>
source§impl ConnectionCore<ClientConnectionData>
impl ConnectionCore<ClientConnectionData>
pub(crate) fn for_client( config: Arc<ClientConfig>, name: ServerName, extra_exts: Vec<ClientExtension>, proto: Protocol, ) -> Result<Self, Error>
pub(crate) fn is_early_data_accepted(&self) -> bool
source§impl ConnectionCore<ServerConnectionData>
impl ConnectionCore<ServerConnectionData>
pub(crate) fn for_server( config: Arc<ServerConfig>, extra_exts: Vec<ServerExtension>, ) -> Result<Self, Error>
pub(crate) fn reject_early_data(&mut self)
pub(crate) fn get_sni_str(&self) -> Option<&str>
Trait Implementations§
source§impl<Data> From<ConnectionCore<Data>> for ConnectionCommon<Data>
impl<Data> From<ConnectionCore<Data>> for ConnectionCommon<Data>
source§fn from(core: ConnectionCore<Data>) -> Self
fn from(core: ConnectionCore<Data>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<Data> Freeze for ConnectionCore<Data>where
Data: Freeze,
impl<Data> !RefUnwindSafe for ConnectionCore<Data>
impl<Data> Send for ConnectionCore<Data>where
Data: Send,
impl<Data> Sync for ConnectionCore<Data>where
Data: Sync,
impl<Data> Unpin for ConnectionCore<Data>where
Data: Unpin,
impl<Data> !UnwindSafe for ConnectionCore<Data>
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