pub enum ServerConfig {
Direct(Arc<dyn RustCrateServer>),
Forwarded(Arc<dyn RustCrateServer>),
Demux(HashMap<u32, ServerConfig>),
DemuxSelect(Box<ServerConfig>, u32),
Merge(Box<AppendOnlyVec<ServerConfig>>),
MergeSelect(Box<ServerConfig>, usize),
Tagged(Box<ServerConfig>, u32),
TaggedUnwrap(Box<ServerConfig>),
Null,
}Variants§
Direct(Arc<dyn RustCrateServer>)
Forwarded(Arc<dyn RustCrateServer>)
Demux(HashMap<u32, ServerConfig>)
A demux that will be used at runtime to listen to many connections.
DemuxSelect(Box<ServerConfig>, u32)
The other side of a demux, with a port to extract the appropriate connection.
Merge(Box<AppendOnlyVec<ServerConfig>>)
A merge that will be used at runtime to combine many connections.
AppendOnlyVec has a quite large inline array, so we box it.
MergeSelect(Box<ServerConfig>, usize)
The other side of a merge, with a port to extract the appropriate connection.
Tagged(Box<ServerConfig>, u32)
TaggedUnwrap(Box<ServerConfig>)
Null
Implementations§
Source§impl ServerConfig
impl ServerConfig
pub fn from_strategy( strategy: &ClientStrategy<'_>, server: Arc<dyn RustCrateServer>, ) -> ServerConfig
Source§impl ServerConfig
impl ServerConfig
pub fn load_instantiated<'life0, 'life_self, 'async_recursion>(
&'life_self self,
select: &'life0 (dyn Fn(ServerPort) -> ServerPort + Send + Sync),
) -> Pin<Box<dyn Future<Output = ServerPort> + Send + 'async_recursion>>where
'life0: 'async_recursion,
'life_self: 'async_recursion,
Trait Implementations§
Source§impl Clone for ServerConfig
impl Clone for ServerConfig
Auto Trait Implementations§
impl !RefUnwindSafe for ServerConfig
impl !UnwindSafe for ServerConfig
impl Forget for ServerConfig
impl Freeze for ServerConfigwhere
*const ArcInner<dyn RustCrateServer> is !null: Freeze,
PhantomData<ArcInner<dyn RustCrateServer>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<(u32, ServerConfig)>: Freeze,
*const ServerConfig is !null: Freeze,
PhantomData<ServerConfig>: Freeze,
*const AppendOnlyVec<ServerConfig> is !null: Freeze,
PhantomData<AppendOnlyVec<ServerConfig>>: Freeze,
impl Move for ServerConfig
impl Send for ServerConfigwhere
Arc<dyn RustCrateServer>: Send,
RawTable<(u32, ServerConfig)>: Send,
BoxRaw<ServerConfig>: Send,
BoxRaw<AppendOnlyVec<ServerConfig>>: Send,
impl Sync for ServerConfigwhere
Arc<dyn RustCrateServer>: Sync,
RawTable<(u32, ServerConfig)>: Sync,
BoxRaw<ServerConfig>: Sync,
BoxRaw<AppendOnlyVec<ServerConfig>>: Sync,
impl Unpin for ServerConfigwhere
Arc<dyn RustCrateServer>: Unpin,
*const u8 is !null: Unpin,
Box<ServerConfig>: Unpin,
Box<AppendOnlyVec<ServerConfig>>: Unpin,
impl UnsafeUnpin for ServerConfigwhere
*const ArcInner<dyn RustCrateServer> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn RustCrateServer>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(u32, ServerConfig)>: UnsafeUnpin,
*const ServerConfig is !null: UnsafeUnpin,
PhantomData<ServerConfig>: UnsafeUnpin,
*const AppendOnlyVec<ServerConfig> is !null: UnsafeUnpin,
PhantomData<AppendOnlyVec<ServerConfig>>: UnsafeUnpin,
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
§impl<T> ToSinkBuild for T
impl<T> ToSinkBuild for T
§fn iter_to_sink_build(self) -> SendIterBuild<Self>
fn iter_to_sink_build(self) -> SendIterBuild<Self>
§fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
fn stream_to_sink_build(self) -> SendStreamBuild<Self>where
Self: Sized + Stream,
Starts a [
SinkBuild] adaptor chain to send all items from self as a [Stream].