Struct rustls::server::AcceptedAlert

source ·
pub struct AcceptedAlert(/* private fields */);
Expand description

Represents a TLS alert resulting from handling the client’s ClientHello message.

When Acceptor::accept() returns an error, it yields an AcceptedAlert such that the application can communicate failure to the client via AcceptedAlert::write().

Implementations§

source§

impl AcceptedAlert

source

pub fn write(&mut self, wr: &mut dyn Write) -> Result<usize, Error>

Send the alert to the client.

To account for short writes this function should be called repeatedly until it returns Ok(0) or an error.

source

pub fn write_all(&mut self, wr: &mut dyn Write) -> Result<(), Error>

Send the alert to the client.

This function will invoke the writer until the buffer is empty.

Trait Implementations§

source§

impl Debug for AcceptedAlert

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ConnectionCommon<ServerConnectionData>> for AcceptedAlert

source§

fn from(conn: ConnectionCommon<ServerConnectionData>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

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.