pub struct BrowseNode { /* private fields */ }Expand description
Container for a node being browsed and the result of the browse operation.
Implementations§
Source§impl BrowseNode
impl BrowseNode
Sourcepub fn set_status(&mut self, status: StatusCode)
pub fn set_status(&mut self, status: StatusCode)
Set the response status, you should make sure to set this if you own the node being browsed. It defaults to BadNodeIdUnknown.
Sourcepub fn continuation_point<T: Send + Sync + 'static>(&self) -> Option<&T>
pub fn continuation_point<T: Send + Sync + 'static>(&self) -> Option<&T>
Get the continuation point created during the last request.
Sourcepub fn continuation_point_mut<T: Send + Sync + 'static>(
&mut self,
) -> Option<&mut T>
pub fn continuation_point_mut<T: Send + Sync + 'static>( &mut self, ) -> Option<&mut T>
Get the continuation point created during the last request.
Sourcepub fn take_continuation_point<T: Send + Sync + 'static>(
&mut self,
) -> Option<Box<T>>
pub fn take_continuation_point<T: Send + Sync + 'static>( &mut self, ) -> Option<Box<T>>
Consume the continuation point created during the last request.
Sourcepub fn set_next_continuation_point<T: Send + Sync + 'static>(
&mut self,
continuation_point: Box<T>,
)
pub fn set_next_continuation_point<T: Send + Sync + 'static>( &mut self, continuation_point: Box<T>, )
Set the continuation point that will be returned to the client.
Sourcepub fn result_len(&self) -> usize
pub fn result_len(&self) -> usize
Get the current number of added references.
Sourcepub fn remaining(&self) -> usize
pub fn remaining(&self) -> usize
Get the number of references that can be added to this result before stopping and returning a continuation point.
Sourcepub fn add_unchecked(&mut self, reference: ReferenceDescription)
pub fn add_unchecked(&mut self, reference: ReferenceDescription)
Add a reference to the results list, without verifying that it is valid. If you do this, you are responsible for validating filters, and requested fields on each reference.
Sourcepub fn allows_reference_type(
&self,
ty: &NodeId,
type_tree: &dyn TypeTree,
) -> bool
pub fn allows_reference_type( &self, ty: &NodeId, type_tree: &dyn TypeTree, ) -> bool
Return true if nodes with the given reference type ID should be returned.
Sourcepub fn allows_node_class(&self, node_class: NodeClass) -> bool
pub fn allows_node_class(&self, node_class: NodeClass) -> bool
Return true if nodes with the given node class should be returned.
Sourcepub fn allows_forward(&self) -> bool
pub fn allows_forward(&self) -> bool
Return true if references with forward direction should be returned.
Sourcepub fn allows_inverse(&self) -> bool
pub fn allows_inverse(&self) -> bool
Return true if references with inverse direction should be returned.
Sourcepub fn matches_filter(
&self,
type_tree: &dyn TypeTree,
reference: &ReferenceDescription,
) -> bool
pub fn matches_filter( &self, type_tree: &dyn TypeTree, reference: &ReferenceDescription, ) -> bool
Return true if the given reference should be returned.
Sourcepub fn add(
&mut self,
type_tree: &dyn TypeTree,
reference: ReferenceDescription,
) -> AddReferenceResult
pub fn add( &mut self, type_tree: &dyn TypeTree, reference: ReferenceDescription, ) -> AddReferenceResult
Add a reference, validating that it matches the filters, and returning Added if it was added.
If the browse node is full, this will return Full containing the given reference if
max_references_per_node would be exceeded. In this case you are responsible for
setting a ContinuationPoint to ensure all references are included.
This will clear any fields not required by ResultMask.
Sourcepub fn include_subtypes(&self) -> bool
pub fn include_subtypes(&self) -> bool
Whether to include subtypes of the reference_type_id.
Sourcepub fn browse_direction(&self) -> BrowseDirection
pub fn browse_direction(&self) -> BrowseDirection
Direction to browse.
Sourcepub fn node_class_mask(&self) -> &NodeClassMask
pub fn node_class_mask(&self) -> &NodeClassMask
Mask for node classes to return. If this is empty, all node classes should be returned.
Sourcepub fn result_mask(&self) -> BrowseDescriptionResultMask
pub fn result_mask(&self) -> BrowseDescriptionResultMask
Mask for attributes to return.
Sourcepub fn reference_type_id(&self) -> &NodeId
pub fn reference_type_id(&self) -> &NodeId
Reference type ID of references to return. Subject to include_subtypes.
Sourcepub fn is_completed(&self) -> bool
pub fn is_completed(&self) -> bool
Returns whether this node is completed in this invocation of the Browse or BrowseNext service. If this returns true, no new nodes should be added.
Sourcepub fn push_external_reference(&mut self, reference: ExternalReference)
pub fn push_external_reference(&mut self, reference: ExternalReference)
Add an external reference to the result. This will be resolved by calling into a different node manager.
Sourcepub fn get_external_refs(&self) -> impl Iterator<Item = &NodeId>
pub fn get_external_refs(&self) -> impl Iterator<Item = &NodeId>
Get an iterator over the external references.
Sourcepub fn any_external_refs(&self) -> bool
pub fn any_external_refs(&self) -> bool
Return true if there are any external references to evaluate.