Struct holochain::prelude::dependencies::kitsune_p2p_types::dependencies::rustls::server::Acceptor
pub struct Acceptor { /* private fields */ }
Expand description
Handle on a server-side connection before configuration is available.
The Acceptor
allows the caller to provide a ServerConfig
based on the ClientHello
of
the incoming connection.
Implementations§
§impl Acceptor
impl Acceptor
pub fn new() -> Result<Acceptor, Error>
👎Deprecated since 0.20.7: Use Acceptor::default instead for an infallible constructor
pub fn new() -> Result<Acceptor, Error>
Create a new Acceptor
.
pub fn wants_read(&self) -> bool
👎Deprecated since 0.20.7: Always returns true
pub fn wants_read(&self) -> bool
Returns true if the caller should call Connection::read_tls()
as soon as possible.
Since the purpose of an Acceptor is to read and then parse TLS bytes, this always returns true.
pub fn read_tls(&mut self, rd: &mut dyn Read) -> Result<usize, Error>
pub fn read_tls(&mut self, rd: &mut dyn Read) -> Result<usize, Error>
Read TLS content from rd
.
Returns an error if this Acceptor
has already yielded an Accepted
. For more details,
refer to Connection::read_tls()
.
pub fn accept(&mut self) -> Result<Option<Accepted>, Error>
pub fn accept(&mut self) -> Result<Option<Accepted>, Error>
Check if a ClientHello
message has been received.
Returns Ok(None)
if the complete ClientHello
has not yet been received.
Do more I/O and then call this function again.
Returns Ok(Some(accepted))
if the connection has been accepted. Call
accepted.into_connection()
to continue. Do not call this function again.
Returns Err(err)
if an error occurred. Do not call this function again.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Acceptor
impl Send for Acceptor
impl Sync for Acceptor
impl Unpin for Acceptor
impl !UnwindSafe for Acceptor
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.