Struct hydro::core::custom_service::CustomClientPort
source · pub struct CustomClientPort {
pub on: Weak<RwLock<CustomService>>,
/* private fields */
}Fields§
§on: Weak<RwLock<CustomService>>Implementations§
source§impl CustomClientPort
impl CustomClientPort
pub fn new(on: Weak<RwLock<CustomService>>) -> Self
pub async fn server_port(&self) -> ServerPort
Trait Implementations§
source§impl HydroflowSink for CustomClientPort
impl HydroflowSink for CustomClientPort
fn as_any_mut(&mut self) -> &mut dyn Any
source§fn instantiate(
&self,
_client_path: &SourcePath
) -> Result<Box<dyn FnOnce() -> ServerConfig>>
fn instantiate( &self, _client_path: &SourcePath ) -> Result<Box<dyn FnOnce() -> ServerConfig>>
Instantiate the sink as the source host connecting to the sink host.
Returns a thunk that can be called to perform mutations that instantiate the sink.
source§fn instantiate_reverse(
&self,
server_host: &Arc<RwLock<dyn Host>>,
server_sink: Arc<dyn HydroflowServer>,
wrap_client_port: &dyn Fn(ServerConfig) -> ServerConfig
) -> Result<Box<dyn FnOnce(&mut dyn Any) -> ServerStrategy>>
fn instantiate_reverse( &self, server_host: &Arc<RwLock<dyn Host>>, server_sink: Arc<dyn HydroflowServer>, wrap_client_port: &dyn Fn(ServerConfig) -> ServerConfig ) -> Result<Box<dyn FnOnce(&mut dyn Any) -> ServerStrategy>>
Instantiate the sink, but as the sink host connecting to the source host.
Returns a thunk that can be called to perform mutations that instantiate the sink, taking a mutable reference to this sink.
source§impl HydroflowSource for CustomClientPort
impl HydroflowSource for CustomClientPort
fn source_path(&self) -> SourcePath
fn host(&self) -> Arc<RwLock<dyn Host>>
fn server(&self) -> Arc<dyn HydroflowServer>
fn record_server_config(&mut self, config: ServerConfig)
fn record_server_strategy(&mut self, _config: ServerStrategy)
fn wrap_reverse_server_config(&self, config: ServerConfig) -> ServerConfig
fn send_to(&mut self, sink: &mut dyn HydroflowSink)
Auto Trait Implementations§
impl !RefUnwindSafe for CustomClientPort
impl Send for CustomClientPort
impl Sync for CustomClientPort
impl Unpin for CustomClientPort
impl !UnwindSafe for CustomClientPort
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