Struct opcua_types::UAString
[−]
[src]
pub struct UAString { pub value: Option<String>, }
A UTF-8 encoded sequence of Unicode characters.
A string can hold a null value, so the string value is optional. When there is no string, the value is treated as null
To avoid naming conflict hell, the String type is named UAString.
Data type ID 12
Fields
value: Option<String>
Methods
impl UAString
[src]
fn from_str(value: &str) -> UAString
Create a string from a string slice
fn len(&self) -> isize
Returns the length of the string or -1 for null
fn null() -> UAString
Create a null string (not the same as an empty string)
fn is_null(&self) -> bool
Test if the string is null
Trait Implementations
impl Eq for UAString
[src]
impl PartialEq for UAString
[src]
fn eq(&self, __arg_0: &UAString) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &UAString) -> bool
This method tests for !=
.
impl Debug for UAString
[src]
impl Clone for UAString
[src]
fn clone(&self) -> UAString
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for UAString
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl BinaryEncoder<UAString> for UAString
[src]
fn byte_len(&self) -> usize
Returns the byte length of the structure. This calculation should be exact and as efficient as possible. Read more
fn encode<S: Write>(&self, stream: &mut S) -> EncodingResult<usize>
Encodes the instance to the write stream.
fn decode<S: Read>(stream: &mut S) -> EncodingResult<Self>
Decodes an instance from the read stream.