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>

source

pub(crate) fn new( state: Box<dyn State<Data>>, data: Data, common_state: CommonState, ) -> Self

source

pub(crate) fn process_new_packets(&mut self) -> Result<IoState, Error>

source

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.

source

fn process_msg( &mut self, msg: PlainMessage, state: Box<dyn State<Data>>, ) -> Result<Box<dyn State<Data>>, Error>

source

pub(crate) fn export_keying_material<T: AsMut<[u8]>>( &self, output: T, label: &[u8], context: Option<&[u8]>, ) -> Result<T, Error>

source§

impl ConnectionCore<ClientConnectionData>

source

pub(crate) fn for_client( config: Arc<ClientConfig>, name: ServerName, extra_exts: Vec<ClientExtension>, proto: Protocol, ) -> Result<Self, Error>

source

pub(crate) fn is_early_data_accepted(&self) -> bool

source§

impl ConnectionCore<ServerConnectionData>

source

pub(crate) fn for_server( config: Arc<ServerConfig>, extra_exts: Vec<ServerExtension>, ) -> Result<Self, Error>

source

pub(crate) fn reject_early_data(&mut self)

source

pub(crate) fn get_sni_str(&self) -> Option<&str>

Trait Implementations§

source§

impl<Data> From<ConnectionCore<Data>> for ConnectionCommon<Data>

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.