Struct opcua_server::prelude::byte_string::ByteString
source · Expand description
A sequence of octets.
Fields§
§value: Option<Vec<u8, Global>>Implementations§
source§impl ByteString
impl ByteString
sourcepub fn null() -> ByteString
pub fn null() -> ByteString
Create a null string (not the same as an empty string)
sourcepub fn is_null_or_empty(&self) -> bool
pub fn is_null_or_empty(&self) -> bool
Test if the string is null or empty
sourcepub fn from_base64(data: &str) -> Option<ByteString>
pub fn from_base64(data: &str) -> Option<ByteString>
Creates a byte string from a Base64 encoded string
sourcepub fn random(number_of_bytes: usize) -> ByteString
pub fn random(number_of_bytes: usize) -> ByteString
Create a byte string with a number of random characters. Can be used to create a nonce or a similar reason.
Trait Implementations§
source§impl AsRef<[u8]> for ByteString
impl AsRef<[u8]> for ByteString
source§impl BinaryEncoder<ByteString> for ByteString
impl BinaryEncoder<ByteString> for ByteString
source§fn byte_len(&self) -> usize
fn byte_len(&self) -> usize
Returns the byte length of the structure. This calculation should be exact and as efficient
as possible. Read more
source§fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>where
S: Write,
fn encode<S>(&self, stream: &mut S) -> Result<usize, StatusCode>where
S: Write,
Encodes the instance to the write stream.
source§fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<ByteString, StatusCode>where
S: Read,
fn decode<S>(
stream: &mut S,
decoding_limits: &DecodingLimits
) -> Result<ByteString, StatusCode>where
S: Read,
Decodes an instance from the read stream. The decoding limits are restrictions set by the server / client
on the length of strings, arrays etc. If these limits are exceeded the implementation should
return with a
BadDecodingError as soon as possible. Read morefn to_vec(&self) -> Vec<u8, Global> ⓘ
source§impl Clone for ByteString
impl Clone for ByteString
source§fn clone(&self) -> ByteString
fn clone(&self) -> ByteString
Returns a copy 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 ByteString
impl Debug for ByteString
source§impl Default for ByteString
impl Default for ByteString
source§fn default() -> ByteString
fn default() -> ByteString
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ByteString
impl<'de> Deserialize<'de> for ByteString
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<ByteString, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<ByteString, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<'a, T> From<&'a T> for ByteStringwhere
T: AsRef<[u8]> + ?Sized,
impl<'a, T> From<&'a T> for ByteStringwhere
T: AsRef<[u8]> + ?Sized,
source§fn from(value: &'a T) -> ByteString
fn from(value: &'a T) -> ByteString
Converts to this type from the input type.
source§impl From<ByteString> for Identifier
impl From<ByteString> for Identifier
source§fn from(v: ByteString) -> Identifier
fn from(v: ByteString) -> Identifier
Converts to this type from the input type.
source§impl From<ByteString> for Variant
impl From<ByteString> for Variant
source§fn from(v: ByteString) -> Variant
fn from(v: ByteString) -> Variant
Converts to this type from the input type.
source§impl Hash for ByteString
impl Hash for ByteString
source§impl Into<ByteString> for Thumbprint
impl Into<ByteString> for Thumbprint
source§fn into(self) -> ByteString
fn into(self) -> ByteString
Converts this type into the (usually inferred) input type.
source§impl Into<String> for ByteString
impl Into<String> for ByteString
source§impl PartialEq<ByteString> for ByteString
impl PartialEq<ByteString> for ByteString
source§fn eq(&self, other: &ByteString) -> bool
fn eq(&self, other: &ByteString) -> bool
source§impl Serialize for ByteString
impl Serialize for ByteString
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more