pub enum LlmpConnection<SP> where
SP: ShMemProvider + 'static, {
IsBroker {
broker: LlmpBroker<SP>,
},
IsClient {
client: LlmpClient<SP>,
},
}
Expand description
An Llmp instance
Variants
IsBroker
Fields
broker: LlmpBroker<SP>
The LlmpBroker
of this LlmpConnection
.
A broker and a thread using this tcp background thread
IsClient
Fields
client: LlmpClient<SP>
The LlmpClient
of this LlmpConnection
.
A client, connected to the port
Implementations
sourceimpl<SP> LlmpConnection<SP> where
SP: ShMemProvider,
impl<SP> LlmpConnection<SP> where
SP: ShMemProvider,
sourcepub fn on_port(shmem_provider: SP, port: u16) -> Result<Self, Error>
pub fn on_port(shmem_provider: SP, port: u16) -> Result<Self, Error>
Creates either a broker, if the tcp port is not bound, or a client, connected to this port.
sourcepub fn broker_on_port(shmem_provider: SP, port: u16) -> Result<Self, Error>
pub fn broker_on_port(shmem_provider: SP, port: u16) -> Result<Self, Error>
Creates a new broker on the given port
sourcepub fn client_on_port(shmem_provider: SP, port: u16) -> Result<Self, Error>
pub fn client_on_port(shmem_provider: SP, port: u16) -> Result<Self, Error>
Creates a new client on the given port
sourcepub fn describe(&self) -> Result<LlmpClientDescription, Error>
pub fn describe(&self) -> Result<LlmpClientDescription, Error>
Describe this in a reproducable fashion, if it’s a client
sourcepub fn existing_client_from_description(
shmem_provider: SP,
description: &LlmpClientDescription
) -> Result<LlmpConnection<SP>, Error>
pub fn existing_client_from_description(
shmem_provider: SP,
description: &LlmpClientDescription
) -> Result<LlmpConnection<SP>, Error>
Recreate an existing client from the stored description
Trait Implementations
sourceimpl<SP: Debug> Debug for LlmpConnection<SP> where
SP: ShMemProvider + 'static,
impl<SP: Debug> Debug for LlmpConnection<SP> where
SP: ShMemProvider + 'static,
Auto Trait Implementations
impl<SP> RefUnwindSafe for LlmpConnection<SP> where
SP: RefUnwindSafe,
<SP as ShMemProvider>::ShMem: RefUnwindSafe,
impl<SP> !Send for LlmpConnection<SP>
impl<SP> !Sync for LlmpConnection<SP>
impl<SP> Unpin for LlmpConnection<SP> where
SP: Unpin,
<SP as ShMemProvider>::ShMem: Unpin,
impl<SP> UnwindSafe for LlmpConnection<SP> where
SP: UnwindSafe,
<SP as ShMemProvider>::ShMem: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
The Resulting TupleList
, of an Prepend::prepend()
call,
including the prepended entry. Read more
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.