pub enum MeshPeer {
WebRtc(Arc<Peer>),
Bluetooth(Arc<BluetoothPeer>),
}Variants§
Implementations§
Source§impl MeshPeer
impl MeshPeer
pub fn is_ready(&self) -> bool
pub fn is_connected(&self) -> bool
pub fn htl_config(&self) -> PeerHTLConfig
pub fn transport(&self) -> PeerTransport
pub async fn request( &self, hash_hex: &str, timeout: Duration, ) -> Result<Option<Vec<u8>>>
pub async fn query_nostr_events( &self, filters: Vec<Filter>, timeout: Duration, ) -> Result<Vec<Event>>
pub async fn send_mesh_frame_text(&self, frame: &MeshNostrFrame) -> Result<()>
pub async fn close(&self) -> Result<()>
pub fn as_webrtc(&self) -> Option<&Arc<Peer>>
Trait Implementations§
Source§impl MeshSession for MeshPeer
impl MeshSession for MeshPeer
fn is_ready(&self) -> bool
fn is_connected(&self) -> bool
fn htl_config(&self) -> PeerHTLConfig
fn request<'life0, 'life1, 'async_trait>(
&'life0 self,
hash_hex: &'life1 str,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn query_nostr_events<'life0, 'async_trait>(
&'life0 self,
filters: Vec<Filter>,
timeout: Duration,
) -> Pin<Box<dyn Future<Output = Result<Vec<Event>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_mesh_frame_text<'life0, 'life1, 'async_trait>(
&'life0 self,
frame: &'life1 MeshNostrFrame,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn transport_debug_state(&self) -> Option<String>
Auto Trait Implementations§
impl Freeze for MeshPeer
impl !RefUnwindSafe for MeshPeer
impl Send for MeshPeer
impl Sync for MeshPeer
impl Unpin for MeshPeer
impl UnsafeUnpin for MeshPeer
impl !UnwindSafe for MeshPeer
Blanket Implementations§
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> 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<'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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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