[][src]Struct lsl::ContinuousResolver

pub struct ContinuousResolver { /* fields omitted */ }

A convenience class that resolves streams continuously in the background.

This object can be queried at any time for the set of streams that are currently visible on the network.

Examples: the resolving_continuously.rs example (found in the crate's github repository) illustrates the use of the ContinuousResolver.

Implementations

impl ContinuousResolver[src]

pub fn new(forget_after: f64) -> Result<ContinuousResolver, Error>[src]

Construct a new continuous_resolver that resolves all streams on the network.

This is analogous to the functionality offered by the free function resolve_streams().

Arguments:

  • forget_after When a stream is no longer visible on the network (e.g., because it was shut down), this is the time in seconds after which it is no longer reported by the resolver. A good value here is 5.0 to report any stream that had been visible in the last 5 seconds.

pub fn new_with_prop(
    prop: &str,
    value: &str,
    forget_after: f64
) -> Result<ContinuousResolver, Error>
[src]

Construct a new ContinuousResolver that resolves all streams with a specific value for a given property.

This is analogous to the functionality provided by the free function resolve_stream(prop,value).

Arguments:

  • prop: The StreamInfo property that should have a specific value (e.g., "name", "type", "source_id", or "desc/manufaturer").
  • value: The string value that the property should have (e.g., "EEG" as the type property).
  • forget_after: When a stream is no longer visible on the network (e.g., because it was shut down), this is the time in seconds after which it is no longer reported by the resolver.

pub fn new_with_pred(
    pred: &str,
    forget_after: f64
) -> Result<ContinuousResolver, Error>
[src]

Construct a new ContinuousResolver that resolves all streams with a specific value for a given property.

This is analogous to the functionality provided by the free function resolve_stream(prop,value).

Arguments:

  • prop: The StreamInfo property that should have a specific value (e.g., "name", "type", "source_id", or "desc/manufaturer").
  • value: The string value that the property should have (e.g., "EEG" as the type property).
  • forget_after: When a stream is no longer visible on the network (e.g., because it was shut down), this is the time in seconds after which it is no longer reported by the resolver.

pub fn results(&self) -> Result<Vec<StreamInfo>, Error>[src]

Obtain the set of currently present streams on the network (i.e. resolve result).

Returns a vector of matching stream info objects (excluding their meta-data), any of which can subsequently be used to open an inlet.

Trait Implementations

impl Debug for ContinuousResolver[src]

impl Drop for ContinuousResolver[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.