Struct holochain::prelude::kitsune_p2p::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<T> Pointee for T
impl<T> Pointee 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.