pub struct StringMessage {
pub encoding: u16,
pub string: String,
}
Expand description
STRING message containing a text string with encoding information
§OpenIGTLink Specification
- Message type: “STRING”
- Body format: ENCODING (uint16) + LENGTH (uint16) + STRING (
uint8[LENGTH]
) - Encoding: MIBenum value (default: 3 = US-ASCII)
- Max length: 65535 bytes
Fields§
§encoding: u16
Character encoding as MIBenum value
Common values:
-
3: US-ASCII (ANSI-X3.4-1968) - recommended
-
106: UTF-8
string: String
The text content
Implementations§
Trait Implementations§
Source§impl Clone for StringMessage
impl Clone for StringMessage
Source§fn clone(&self) -> StringMessage
fn clone(&self) -> StringMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StringMessage
impl Debug for StringMessage
Source§impl From<&str> for StringMessage
impl From<&str> for StringMessage
Source§impl From<String> for StringMessage
impl From<String> for StringMessage
Source§impl Message for StringMessage
impl Message for StringMessage
Source§impl PartialEq for StringMessage
impl PartialEq for StringMessage
impl StructuralPartialEq for StringMessage
Auto Trait Implementations§
impl Freeze for StringMessage
impl RefUnwindSafe for StringMessage
impl Send for StringMessage
impl Sync for StringMessage
impl Unpin for StringMessage
impl UnwindSafe for StringMessage
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