Struct opcua_types::byte_string::ByteString
[−]
[src]
pub struct ByteString {
pub value: Option<Vec<u8>>,
}A sequence of octets.
Fields
value: Option<Vec<u8>>
Methods
impl ByteString[src]
fn null() -> ByteString[src]
Create a null string (not the same as an empty string)
fn is_null(&self) -> bool[src]
Test if the string is null
fn is_null_or_empty(&self) -> bool[src]
Test if the string is null or empty
fn from_base64(data: &str) -> Option<ByteString>[src]
Creates a byte string from a Base64 encoded string
fn as_base64(&self) -> String[src]
Encodes the bytestring as a Base64 encoded string
fn nonce() -> ByteString[src]
Creates a nonce - 32 bytes of random data
fn random(number_of_bytes: usize) -> ByteString[src]
Create a byte string with a number of random characters. Can be used to create a nonce or a similar reason.
Trait Implementations
impl Eq for ByteString[src]
impl PartialEq for ByteString[src]
fn eq(&self, __arg_0: &ByteString) -> bool[src]
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &ByteString) -> bool[src]
This method tests for !=.
impl Debug for ByteString[src]
impl Clone for ByteString[src]
fn clone(&self) -> ByteString[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
Performs copy-assignment from source. Read more
impl Hash for ByteString[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)[src]
Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher]. Read more
impl AsRef<[u8]> for ByteString[src]
impl BinaryEncoder<ByteString> for ByteString[src]
fn byte_len(&self) -> usize[src]
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>[src]
Encodes the instance to the write stream.
fn decode<S: Read>(stream: &mut S) -> EncodingResult<Self>[src]
Decodes an instance from the read stream.
impl<'a, T: ?Sized> From<&'a T> for ByteString where
T: AsRef<[u8]>, [src]
T: AsRef<[u8]>,