pub struct ExpandedNodeId {
pub node_id: NodeId,
pub namespace_uri: UAString,
pub server_index: u32,
}Expand description
A NodeId that allows the namespace URI to be specified instead of an index.
Fields§
§node_id: NodeIdThe inner NodeId.
namespace_uri: UAStringThe full namespace URI. If this is set, the node ID namespace index may be zero.
server_index: u32The server index. 0 means current server.
Implementations§
Source§impl ExpandedNodeId
impl ExpandedNodeId
Sourcepub fn new<T>(value: T) -> ExpandedNodeIdwhere
T: 'static + Into<ExpandedNodeId>,
pub fn new<T>(value: T) -> ExpandedNodeIdwhere
T: 'static + Into<ExpandedNodeId>,
Creates an expanded node id from a node id
Sourcepub fn new_with_namespace(
namespace: &str,
value: impl Into<Identifier> + 'static,
) -> Self
pub fn new_with_namespace( namespace: &str, value: impl Into<Identifier> + 'static, ) -> Self
Creates an expanded node id from a namespace URI and an identifier.
Sourcepub fn null() -> ExpandedNodeId
pub fn null() -> ExpandedNodeId
Return a null ExpandedNodeId.
Sourcepub fn try_resolve<'a>(
&'a self,
namespaces: &NamespaceMap,
) -> Option<Cow<'a, NodeId>>
pub fn try_resolve<'a>( &'a self, namespaces: &NamespaceMap, ) -> Option<Cow<'a, NodeId>>
Try to resolve the expanded node ID into a NodeId. This will directly return the inner NodeId if namespace URI is null, otherwise it will try to return a NodeId with the namespace index given by the namespace uri. If server index is non-zero, this will always return None, otherwise, it will return None if the namespace is not in the namespace map.
Trait Implementations§
Source§impl BinaryDecodable for ExpandedNodeId
impl BinaryDecodable for ExpandedNodeId
Source§fn decode<S: Read + ?Sized>(
stream: &mut S,
ctx: &Context<'_>,
) -> EncodingResult<Self>
fn decode<S: Read + ?Sized>( stream: &mut S, ctx: &Context<'_>, ) -> EncodingResult<Self>
Decodes an instance from the read stream. The decoding options contains 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.Source§impl BinaryEncodable for ExpandedNodeId
impl BinaryEncodable for ExpandedNodeId
Source§fn byte_len(&self, ctx: &Context<'_>) -> usize
fn byte_len(&self, ctx: &Context<'_>) -> usize
Returns the exact byte length of the structure as it would be if
encode were called.
This may be called prior to writing to ensure the correct amount of space is available.Source§fn encode<S: Write + ?Sized>(
&self,
stream: &mut S,
ctx: &Context<'_>,
) -> EncodingResult<()>
fn encode<S: Write + ?Sized>( &self, stream: &mut S, ctx: &Context<'_>, ) -> EncodingResult<()>
Encodes the instance to the write stream.
Source§fn override_encoding(&self) -> Option<BuiltInDataEncoding>
fn override_encoding(&self) -> Option<BuiltInDataEncoding>
Override the extension object encoding used for this type.
This only makes sense if the type can only ever be encoded using a single
built-in encoding.
Source§impl Clone for ExpandedNodeId
impl Clone for ExpandedNodeId
Source§fn clone(&self) -> ExpandedNodeId
fn clone(&self) -> ExpandedNodeId
Returns a duplicate 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 ExpandedNodeId
impl Debug for ExpandedNodeId
Source§impl Default for ExpandedNodeId
impl Default for ExpandedNodeId
Source§fn default() -> ExpandedNodeId
fn default() -> ExpandedNodeId
Returns the “default value” for a type. Read more
Source§impl Display for ExpandedNodeId
impl Display for ExpandedNodeId
Source§impl From<&NodeId> for ExpandedNodeId
impl From<&NodeId> for ExpandedNodeId
Source§impl<T> From<(T, &str)> for ExpandedNodeId
impl<T> From<(T, &str)> for ExpandedNodeId
Source§impl From<DataTypeId> for ExpandedNodeId
impl From<DataTypeId> for ExpandedNodeId
Source§fn from(r: DataTypeId) -> Self
fn from(r: DataTypeId) -> Self
Converts to this type from the input type.
Source§impl From<MethodId> for ExpandedNodeId
impl From<MethodId> for ExpandedNodeId
Source§impl From<NodeId> for ExpandedNodeId
impl From<NodeId> for ExpandedNodeId
Source§impl From<ObjectId> for ExpandedNodeId
impl From<ObjectId> for ExpandedNodeId
Source§impl From<ObjectTypeId> for ExpandedNodeId
impl From<ObjectTypeId> for ExpandedNodeId
Source§fn from(r: ObjectTypeId) -> Self
fn from(r: ObjectTypeId) -> Self
Converts to this type from the input type.
Source§impl From<ReferenceTypeId> for ExpandedNodeId
impl From<ReferenceTypeId> for ExpandedNodeId
Source§fn from(r: ReferenceTypeId) -> Self
fn from(r: ReferenceTypeId) -> Self
Converts to this type from the input type.
Source§impl From<VariableId> for ExpandedNodeId
impl From<VariableId> for ExpandedNodeId
Source§fn from(r: VariableId) -> Self
fn from(r: VariableId) -> Self
Converts to this type from the input type.
Source§impl From<VariableTypeId> for ExpandedNodeId
impl From<VariableTypeId> for ExpandedNodeId
Source§fn from(r: VariableTypeId) -> Self
fn from(r: VariableTypeId) -> Self
Converts to this type from the input type.
Source§impl FromStr for ExpandedNodeId
impl FromStr for ExpandedNodeId
Source§impl Hash for ExpandedNodeId
impl Hash for ExpandedNodeId
Source§impl IntoVariant for Box<ExpandedNodeId>
impl IntoVariant for Box<ExpandedNodeId>
Source§fn into_variant(self) -> Variant
fn into_variant(self) -> Variant
Convert self into a variant.
Source§impl IntoVariant for ExpandedNodeId
impl IntoVariant for ExpandedNodeId
Source§fn into_variant(self) -> Variant
fn into_variant(self) -> Variant
Convert self into a variant.
Source§impl JsonDecodable for ExpandedNodeId
impl JsonDecodable for ExpandedNodeId
Source§fn decode(
stream: &mut JsonStreamReader<&mut dyn Read>,
_ctx: &Context<'_>,
) -> EncodingResult<Self>
fn decode( stream: &mut JsonStreamReader<&mut dyn Read>, _ctx: &Context<'_>, ) -> EncodingResult<Self>
Decode Self from a JSON stream.
Source§impl JsonEncodable for ExpandedNodeId
impl JsonEncodable for ExpandedNodeId
Source§fn encode(
&self,
stream: &mut JsonStreamWriter<&mut dyn Write>,
ctx: &Context<'_>,
) -> EncodingResult<()>
fn encode( &self, stream: &mut JsonStreamWriter<&mut dyn Write>, ctx: &Context<'_>, ) -> EncodingResult<()>
Write the type to the provided JSON writer.
Source§impl PartialEq for ExpandedNodeId
impl PartialEq for ExpandedNodeId
Source§impl TryFromVariant for ExpandedNodeId
impl TryFromVariant for ExpandedNodeId
Source§impl UaNullable for ExpandedNodeId
impl UaNullable for ExpandedNodeId
Source§fn is_ua_null(&self) -> bool
fn is_ua_null(&self) -> bool
Return true if this value is null, meaning it can be left out when
being encoded in JSON and XML encodings.
Source§impl VariantType for ExpandedNodeId
impl VariantType for ExpandedNodeId
Source§fn variant_type_id() -> VariantScalarTypeId
fn variant_type_id() -> VariantScalarTypeId
The variant kind this type will be represented as.
Source§impl XmlDecodable for ExpandedNodeId
impl XmlDecodable for ExpandedNodeId
Source§fn decode(
reader: &mut XmlStreamReader<&mut dyn Read>,
context: &Context<'_>,
) -> EncodingResult<Self>
fn decode( reader: &mut XmlStreamReader<&mut dyn Read>, context: &Context<'_>, ) -> EncodingResult<Self>
Decode a value from an XML stream.
Source§impl XmlEncodable for ExpandedNodeId
impl XmlEncodable for ExpandedNodeId
Source§fn encode(
&self,
writer: &mut XmlStreamWriter<&mut dyn Write>,
context: &Context<'_>,
) -> EncodingResult<()>
fn encode( &self, writer: &mut XmlStreamWriter<&mut dyn Write>, context: &Context<'_>, ) -> EncodingResult<()>
Encode a value to an XML stream.
Source§impl XmlType for ExpandedNodeId
impl XmlType for ExpandedNodeId
impl Eq for ExpandedNodeId
impl StructuralPartialEq for ExpandedNodeId
Auto Trait Implementations§
impl Freeze for ExpandedNodeId
impl RefUnwindSafe for ExpandedNodeId
impl Send for ExpandedNodeId
impl Sync for ExpandedNodeId
impl Unpin for ExpandedNodeId
impl UnwindSafe for ExpandedNodeId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> EventField for Twhere
T: IntoVariant + Clone,
impl<T> EventField for Twhere
T: IntoVariant + Clone,
Source§fn get_value(
&self,
attribute_id: AttributeId,
index_range: &NumericRange,
remaining_path: &[QualifiedName],
) -> Variant
fn get_value( &self, attribute_id: AttributeId, index_range: &NumericRange, remaining_path: &[QualifiedName], ) -> Variant
Get the variant representation of this field, using the given index range. Read more