pub struct ChannelServer { /* private fields */ }
Expand description
Channel server
- channel server will handle query and broadcast transmissions between two machines
Implementations§
Source§impl ChannelServer
impl ChannelServer
Sourcepub async fn bind<A: ToSocketAddrs>(addr: A) -> Result<Self, String>
pub async fn bind<A: ToSocketAddrs>(addr: A) -> Result<Self, String>
Build channel server
addr: A
: Socket address to be bound toA: ToSocketAddrs
: type of the socket address- Output: the channel server or an error
Sourcepub async fn accept(
&mut self,
clients: &mut HashSet<SocketAddr>,
capacity: Option<usize>,
) -> Result<(), String>
pub async fn accept( &mut self, clients: &mut HashSet<SocketAddr>, capacity: Option<usize>, ) -> Result<(), String>
Accept a list of clients
clients: &mut HashSet<SocketAddr>
: list of clients identified with their socket addresscapacity: Option<usize>
: size parameter for defining bounded or unbounnded channels Nothing or an error
Sourcepub async fn receiver_query<U, V>(
&mut self,
channel: u64,
capacity: Option<usize>,
) -> ArchQueryReceiver<U, V>
pub async fn receiver_query<U, V>( &mut self, channel: u64, capacity: Option<usize>, ) -> ArchQueryReceiver<U, V>
Register a query receiver for archived data
channel: ChannelIdType
: channel identifiercapacity: Option<usize>
: size parameter for defining bounded or unbounnded channelsU
: type of the query data; needs to implementSlxData
V
: type of the reply data; needs to implementSlxData
- Output: query receiver for archived data
Sourcepub async fn receiver_broadcast<U>(
&mut self,
channel: u64,
capacity: usize,
) -> RootArchBroadcastReceiver<U>where
U: SlxData,
pub async fn receiver_broadcast<U>(
&mut self,
channel: u64,
capacity: usize,
) -> RootArchBroadcastReceiver<U>where
U: SlxData,
Register a broadcast receiver for archived data
channel: ChannelIdType
: channel identifiercapacity: usize
: capacity of the channelU
: type of the data; needs to implementSlxData
- Output: broadcast receiver for archived data
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ChannelServer
impl !RefUnwindSafe for ChannelServer
impl Send for ChannelServer
impl Sync for ChannelServer
impl Unpin for ChannelServer
impl !UnwindSafe for ChannelServer
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> HashedTypeMethods for T
impl<T> HashedTypeMethods for T
Source§fn type_hash_native<REF>() -> u128where
Self: HashedTypeDef<REF>,
fn type_hash_native<REF>() -> u128where
Self: HashedTypeDef<REF>,
return native type hash
Source§fn type_hash_le<REF>() -> u128where
Self: HashedTypeDef<REF>,
fn type_hash_le<REF>() -> u128where
Self: HashedTypeDef<REF>,
return little endianess type hash
Source§fn type_hash_be<REF>() -> u128where
Self: HashedTypeDef<REF>,
fn type_hash_be<REF>() -> u128where
Self: HashedTypeDef<REF>,
return big endianess type hash
Source§fn type_uuid<REF>() -> Uuidwhere
Self: HashedTypeDef<REF>,
fn type_uuid<REF>() -> Uuidwhere
Self: HashedTypeDef<REF>,
return uuid derived from type hash
Source§fn type_uuid_hyphenated<REF>() -> Stringwhere
Self: HashedTypeDef<REF>,
fn type_uuid_hyphenated<REF>() -> Stringwhere
Self: HashedTypeDef<REF>,
return uuid hyphenated string
Source§fn self_type_hash_native<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
fn self_type_hash_native<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
return native type hash from instance
Source§fn self_type_hash_le<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
fn self_type_hash_le<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
return little endianess type hash from instance
Source§fn self_type_hash_be<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
fn self_type_hash_be<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
return big endianess type hash from instance
Source§fn self_type_uuid<REF>(&self) -> Uuidwhere
Self: HashedTypeDef<REF>,
fn self_type_uuid<REF>(&self) -> Uuidwhere
Self: HashedTypeDef<REF>,
return type hash-derived uuid from instance
Source§fn self_type_uuid_hyphenated<REF>(&self) -> Stringwhere
Self: HashedTypeDef<REF>,
fn self_type_uuid_hyphenated<REF>(&self) -> Stringwhere
Self: HashedTypeDef<REF>,
return uuid hyphenated string from instance
Source§impl<T> HashedTypeUuid for T
impl<T> HashedTypeUuid for T
Source§fn type_hash_native<REF>() -> u128where
Self: HashedTypeDef<REF>,
fn type_hash_native<REF>() -> u128where
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn native type hash
Source§fn type_hash_le<REF>() -> u128where
Self: HashedTypeDef<REF>,
fn type_hash_le<REF>() -> u128where
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn little endianess type hash
Source§fn type_hash_be<REF>() -> u128where
Self: HashedTypeDef<REF>,
fn type_hash_be<REF>() -> u128where
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn big endianess type hash
Source§fn type_uuid<REF>() -> Uuidwhere
Self: HashedTypeDef<REF>,
fn type_uuid<REF>() -> Uuidwhere
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn uuid derived from type hash
Source§fn type_uuid_hyphenated<REF>() -> Stringwhere
Self: HashedTypeDef<REF>,
fn type_uuid_hyphenated<REF>() -> Stringwhere
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn uuid hyphenated string
Source§fn self_type_hash_native<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
fn self_type_hash_native<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn native type hash from instance
Source§fn self_type_hash_le<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
fn self_type_hash_le<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn little endianess type hash from instance
Source§fn self_type_hash_be<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
fn self_type_hash_be<REF>(&self) -> u128where
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn big endianess type hash from instance
Source§fn self_type_uuid<REF>(&self) -> Uuidwhere
Self: HashedTypeDef<REF>,
fn self_type_uuid<REF>(&self) -> Uuidwhere
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn type hash-derived uuid from instance
Source§fn self_type_uuid_hyphenated<REF>(&self) -> Stringwhere
Self: HashedTypeDef<REF>,
fn self_type_uuid_hyphenated<REF>(&self) -> Stringwhere
Self: HashedTypeDef<REF>,
👎Deprecated since 0.1.2: please use
HashedTypeMethods
traitreturn uuid hyphenated string from instance