Skip to main content

BrowseNode

Struct BrowseNode 

Source
pub struct BrowseNode { /* private fields */ }
Expand description

Container for a node being browsed and the result of the browse operation.

Implementations§

Source§

impl BrowseNode

Source

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.

Source

pub fn continuation_point<T: Send + Sync + 'static>(&self) -> Option<&T>

Get the continuation point created during the last request.

Source

pub fn continuation_point_mut<T: Send + Sync + 'static>( &mut self, ) -> Option<&mut T>

Get the continuation point created during the last request.

Source

pub fn take_continuation_point<T: Send + Sync + 'static>( &mut self, ) -> Option<Box<T>>

Consume the continuation point created during the last request.

Source

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.

Source

pub fn result_len(&self) -> usize

Get the current number of added references.

Source

pub fn remaining(&self) -> usize

Get the number of references that can be added to this result before stopping and returning a continuation point.

Source

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.

Source

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.

Source

pub fn allows_node_class(&self, node_class: NodeClass) -> bool

Return true if nodes with the given node class should be returned.

Source

pub fn allows_forward(&self) -> bool

Return true if references with forward direction should be returned.

Source

pub fn allows_inverse(&self) -> bool

Return true if references with inverse direction should be returned.

Source

pub fn matches_filter( &self, type_tree: &dyn TypeTree, reference: &ReferenceDescription, ) -> bool

Return true if the given reference should be returned.

Source

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.

Source

pub fn include_subtypes(&self) -> bool

Whether to include subtypes of the reference_type_id.

Source

pub fn node_id(&self) -> &NodeId

Node ID to browse.

Source

pub fn browse_direction(&self) -> BrowseDirection

Direction to browse.

Source

pub fn node_class_mask(&self) -> &NodeClassMask

Mask for node classes to return. If this is empty, all node classes should be returned.

Source

pub fn result_mask(&self) -> BrowseDescriptionResultMask

Mask for attributes to return.

Source

pub fn reference_type_id(&self) -> &NodeId

Reference type ID of references to return. Subject to include_subtypes.

Source

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.

Source

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.

Source

pub fn get_external_refs(&self) -> impl Iterator<Item = &NodeId>

Get an iterator over the external references.

Source

pub fn any_external_refs(&self) -> bool

Return true if there are any external references to evaluate.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoAnyArc for T
where T: Send + Sync + 'static,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Upcast to Arc<dyn Any>.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more