pub struct PhantomStream { /* private fields */ }Implementations§
Source§impl PhantomStream
impl PhantomStream
pub fn new(handle: StreamHandle, tx: Sender<SessionCommand>) -> Self
Source§impl PhantomStream
impl PhantomStream
pub fn stream_id(&self) -> u32
pub async fn send_reliable(&self, data: Vec<u8>) -> Result<(), CoreError>
pub async fn send_unreliable(&self, data: Vec<u8>) -> Result<(), CoreError>
pub async fn recv(&self) -> Result<Vec<u8>, CoreError>
Sourcepub async fn disconnect(&self) -> Result<(), CoreError>
pub async fn disconnect(&self) -> Result<(), CoreError>
Close this stream; the peer will see EOF on its read half.
Named disconnect rather than close for the same reason as
PhantomSession::disconnect — UniFFI’s Kotlin generator emits
AutoCloseable.close() on every object.
Trait Implementations§
Source§impl<UT> LiftRef<UT> for PhantomStream
impl<UT> LiftRef<UT> for PhantomStream
type LiftType = Arc<PhantomStream>
Source§impl<UT> LowerError<UT> for PhantomStream
impl<UT> LowerError<UT> for PhantomStream
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Lower this value for scaffolding function return Read more
Source§impl<UT> LowerReturn<UT> for PhantomStream
impl<UT> LowerReturn<UT> for PhantomStream
Source§type ReturnType = <Arc<PhantomStream> as LowerReturn<UniFfiTag>>::ReturnType
type ReturnType = <Arc<PhantomStream> as LowerReturn<UniFfiTag>>::ReturnType
The type that should be returned by scaffolding functions for this type. Read more
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustCallError>
Lower the return value from an scaffolding call Read more
Source§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Lower the return value for failed argument lifts Read more
Source§impl<UT> TypeId<UT> for PhantomStream
impl<UT> TypeId<UT> for PhantomStream
Auto Trait Implementations§
impl !Freeze for PhantomStream
impl !RefUnwindSafe for PhantomStream
impl Send for PhantomStream
impl Sync for PhantomStream
impl Unpin for PhantomStream
impl UnsafeUnpin for PhantomStream
impl UnwindSafe for PhantomStream
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