pub struct LinksBuilder<'a> { /* private fields */ }Available on crate feature
unstable only.Expand description
A builder returned by SessionInfo::links().
This API has been marked as unstable: it works as advertised, but it may be changed in a future release.
The builder creates an iterator over the established Links
within the session.
Multiple Link can be established between two zenoh nodes within
the same Transport.
By default all links are returned, but you can filter them by transport using
the transport() method.
§Examples
let session = zenoh::open(zenoh::Config::default()).await.unwrap();
let links = session.info().links().await;
for link in links {
println!("Link: {} -> {}", link.src(), link.dst());
}Implementations§
Source§impl<'a> LinksBuilder<'a>
impl<'a> LinksBuilder<'a>
Sourcepub fn transport(self, transport: Transport) -> Self
pub fn transport(self, transport: Transport) -> Self
Filter links by transport.
§Examples
let session = zenoh::open(zenoh::Config::default()).await.unwrap();
let transports = session.info().transports().await;
if let Some(transport) = transports.into_iter().next() {
let links = session.info().links().transport(transport).await;
for link in links {
println!("Link: {} -> {}", link.src(), link.dst());
}
}Trait Implementations§
Source§impl IntoFuture for LinksBuilder<'_>
impl IntoFuture for LinksBuilder<'_>
Source§type Output = <LinksBuilder<'_> as Resolvable>::To
type Output = <LinksBuilder<'_> as Resolvable>::To
The output that the future will produce on completion.
Source§type IntoFuture = Ready<<LinksBuilder<'_> as Resolvable>::To>
type IntoFuture = Ready<<LinksBuilder<'_> as Resolvable>::To>
Which kind of future are we turning this into?
Source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Source§impl Resolvable for LinksBuilder<'_>
impl Resolvable for LinksBuilder<'_>
Auto Trait Implementations§
impl<'a> Freeze for LinksBuilder<'a>
impl<'a> !RefUnwindSafe for LinksBuilder<'a>
impl<'a> Send for LinksBuilder<'a>
impl<'a> Sync for LinksBuilder<'a>
impl<'a> Unpin for LinksBuilder<'a>
impl<'a> UnsafeUnpin for LinksBuilder<'a>
impl<'a> !UnwindSafe for LinksBuilder<'a>
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more