[][src]Struct opcua_server::prelude::UAString

pub struct UAString { /* fields omitted */ }

To avoid naming conflict hell, the OPC UA String type is typed UAString so it does not collide with the Rust String.

A string contains UTF-8 encoded characters or a null value. A null value is distinct from being an empty string so internally, the code maintains that distinction by holding the value as an Option<String>.

Implementations

impl UAString[src]

pub fn value(&self) -> &Option<String>[src]

pub fn set_value(&mut self, value: Option<String>)[src]

pub fn is_empty(&self) -> bool[src]

Returns true if the string is null or empty, false otherwise

pub fn len(&self) -> isize[src]

Returns the length of the string in bytes or -1 for null.

pub fn null() -> UAString[src]

Create a null string (not the same as an empty string).

pub fn is_null(&self) -> bool[src]

Test if the string is null.

pub fn substring(&self, min: usize, max: usize) -> Result<UAString, ()>[src]

This function is meant for use with NumericRange. It creates a substring from this string from min up to and inclusive of max. Note that min must have an index within the string but max is allowed to be beyond the end in which case the remainder of the string is returned (see docs for NumericRange).

Trait Implementations

impl AsRef<str> for UAString[src]

impl BinaryEncoder<UAString> for UAString[src]

impl Clone for UAString[src]

impl Debug for UAString[src]

impl Default for UAString[src]

impl<'de> Deserialize<'de> for UAString[src]

impl Display for UAString[src]

impl Eq for UAString[src]

impl<'_> From<&'_ String> for UAString[src]

impl<'a> From<&'a str> for UAString[src]

impl From<String> for UAString[src]

impl From<UAString> for Variant[src]

impl From<UAString> for Identifier[src]

impl From<UAString> for DataValue[src]

impl Hash for UAString[src]

impl PartialEq<UAString> for UAString[src]

impl<'a, 'b> PartialEq<str> for UAString[src]

impl Serialize for UAString[src]

impl StructuralEq for UAString[src]

impl StructuralPartialEq for UAString[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,