[−][src]Struct lsl::ContinuousResolver
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]
prop: &str,
value: &str,
forget_after: f64
) -> Result<ContinuousResolver, Error>
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
: TheStreamInfo
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]
pred: &str,
forget_after: f64
) -> Result<ContinuousResolver, Error>
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
: TheStreamInfo
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
impl RefUnwindSafe for ContinuousResolver
impl !Send for ContinuousResolver
impl !Sync for ContinuousResolver
impl Unpin for ContinuousResolver
impl UnwindSafe for ContinuousResolver
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,