[−][src]Struct opcua_server::prelude::UAString
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]
fn byte_len(&self) -> usize[src]
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode> where
S: Write, [src]
S: Write,
fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<UAString, StatusCode> where
S: Read, [src]
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<UAString, StatusCode> where
S: Read,
fn encode_to_vec(&self) -> Vec<u8>[src]
impl Clone for UAString[src]
impl Debug for UAString[src]
impl Default for UAString[src]
impl<'de> Deserialize<'de> for UAString[src]
fn deserialize<__D>(
__deserializer: __D
) -> Result<UAString, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>, [src]
__deserializer: __D
) -> Result<UAString, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
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]
fn from(v: UAString) -> Identifier[src]
impl From<UAString> for DataValue[src]
impl Hash for UAString[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher, [src]
__H: Hasher,
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<UAString> for UAString[src]
impl<'a, 'b> PartialEq<str> for UAString[src]
impl Serialize for UAString[src]
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer, [src]
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
impl StructuralEq for UAString[src]
impl StructuralPartialEq for UAString[src]
Auto Trait Implementations
impl RefUnwindSafe for UAString
impl Send for UAString
impl Sync for UAString
impl Unpin for UAString
impl UnwindSafe for UAString
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>, [src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,