pub struct ShadowApi { /* private fields */ }Expand description
High-level Shadow Network API
Implementations§
Source§impl ShadowApi
impl ShadowApi
Sourcepub fn new(node: ShadowNode) -> Self
pub fn new(node: ShadowNode) -> Self
Create new API instance
Sourcepub async fn send_text(&self, _peer_id: &PeerId, _message: &str) -> Result<()>
pub async fn send_text(&self, _peer_id: &PeerId, _message: &str) -> Result<()>
Send text message to peer (placeholder - requires full transport impl)
Sourcepub async fn send_data(&self, _peer_id: &PeerId, _data: &[u8]) -> Result<()>
pub async fn send_data(&self, _peer_id: &PeerId, _data: &[u8]) -> Result<()>
Send binary data to peer (placeholder - requires full transport impl)
Sourcepub async fn send_file_steganographic(
&self,
peer_id: &PeerId,
file_data: &[u8],
cover_image_path: &str,
) -> Result<String>
pub async fn send_file_steganographic( &self, peer_id: &PeerId, file_data: &[u8], cover_image_path: &str, ) -> Result<String>
Send file with steganography
Sourcepub async fn receive_file_steganographic(
&self,
stego_image_path: &str,
) -> Result<Vec<u8>>
pub async fn receive_file_steganographic( &self, stego_image_path: &str, ) -> Result<Vec<u8>>
Receive file with steganography
Sourcepub async fn next_event(&mut self) -> Option<MessageEvent>
pub async fn next_event(&mut self) -> Option<MessageEvent>
Get next event
Auto Trait Implementations§
impl Freeze for ShadowApi
impl !RefUnwindSafe for ShadowApi
impl Send for ShadowApi
impl Sync for ShadowApi
impl Unpin for ShadowApi
impl UnsafeUnpin for ShadowApi
impl !UnwindSafe for ShadowApi
Blanket Implementations§
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