pub enum SyncIgtlClient {
TcpSync(SyncTcpClient),
}
Expand description
Synchronous OpenIGTLink client
Simple wrapper around the synchronous TCP client.
Recommended: Use ClientBuilder
:
use openigtlink_rust::io::builder::ClientBuilder;
let client = ClientBuilder::new().tcp("127.0.0.1:18944").sync().build()?;
Variants§
TcpSync(SyncTcpClient)
Standard TCP synchronous client
Implementations§
Source§impl SyncIgtlClient
impl SyncIgtlClient
Sourcepub fn receive<T: Message>(&mut self) -> Result<IgtlMessage<T>>
pub fn receive<T: Message>(&mut self) -> Result<IgtlMessage<T>>
Sourcepub fn set_verify_crc(&mut self, verify: bool)
pub fn set_verify_crc(&mut self, verify: bool)
Enable or disable CRC verification for received messages
§Arguments
verify
- true to enable CRC verification, false to disable
Sourcepub fn receive_any(&mut self) -> Result<AnyMessage>
pub fn receive_any(&mut self) -> Result<AnyMessage>
Receive any message type dynamically without knowing the type in advance
§Returns
Decoded message wrapped in AnyMessage enum, or error
Auto Trait Implementations§
impl Freeze for SyncIgtlClient
impl RefUnwindSafe for SyncIgtlClient
impl Send for SyncIgtlClient
impl Sync for SyncIgtlClient
impl Unpin for SyncIgtlClient
impl UnwindSafe for SyncIgtlClient
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