pub struct ConnectionOrientedSocketSpecification { /* private fields */ }Expand description
Specification for a connection-oriented network listener.
Creates a ConnectionOrientedListener, which accepts connections on TCP or Unix stream addresses only.
Only the listen address identifies the resource. The accept backoff is applied when the listener is first created and has no effect on a later acquisition of the same address, since the socket is already bound. The registry logs a warning if a subsequent specification disagrees.
Implementations§
Source§impl ConnectionOrientedSocketSpecification
impl ConnectionOrientedSocketSpecification
Sourcepub fn new(address: ListenAddress) -> Self
pub fn new(address: ListenAddress) -> Self
Creates a specification for the given listen address.
Sourcepub fn with_accept_backoff(
self,
accept_backoff: Option<ExponentialBackoff>,
) -> Self
pub fn with_accept_backoff( self, accept_backoff: Option<ExponentialBackoff>, ) -> Self
Sets the backoff the listener applies when accepting fails for want of a system resource.
None keeps the listener’s default. See ConnectionOrientedListener::with_accept_backoff.
Sourcepub fn listen_address(&self) -> &ListenAddress
pub fn listen_address(&self) -> &ListenAddress
Returns the listen address this specification names.
Trait Implementations§
Source§impl Clone for ConnectionOrientedSocketSpecification
impl Clone for ConnectionOrientedSocketSpecification
Source§fn clone(&self) -> ConnectionOrientedSocketSpecification
fn clone(&self) -> ConnectionOrientedSocketSpecification
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl From<ListenAddress> for ConnectionOrientedSocketSpecification
impl From<ListenAddress> for ConnectionOrientedSocketSpecification
Source§fn from(address: ListenAddress) -> Self
fn from(address: ListenAddress) -> Self
Converts to this type from the input type.
Source§impl ResourceSpecification for ConnectionOrientedSocketSpecification
impl ResourceSpecification for ConnectionOrientedSocketSpecification
Source§const KIND: ResourceKind = ResourceKind::Socket
const KIND: ResourceKind = ResourceKind::Socket
Kind of the resource this specification names.
Source§type Resource = ConnectionOrientedListener
type Resource = ConnectionOrientedListener
Type of the resource this specification creates.
Source§fn key(&self) -> MetaString
fn key(&self) -> MetaString
Returns the key for the resource this specification names. Read more
Auto Trait Implementations§
impl Freeze for ConnectionOrientedSocketSpecification
impl RefUnwindSafe for ConnectionOrientedSocketSpecification
impl Send for ConnectionOrientedSocketSpecification
impl Sync for ConnectionOrientedSocketSpecification
impl Unpin for ConnectionOrientedSocketSpecification
impl UnwindSafe for ConnectionOrientedSocketSpecification
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Track for T
impl<T> Track for T
Source§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read moreSource§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Instruments this type by attaching the current resource group, returning a
Tracked wrapper. Read more