pub struct RecvTube(pub(crate) Tube);
Expand description
A Tube end which can only recv messages.
Tuple Fields§
§0: Tube
Implementations§
source§impl RecvTube
impl RecvTube
pub fn recv<T: DeserializeOwned>(&self) -> Result<T>
sourcepub fn set_recv_timeout(&self, _timeout: Option<Duration>) -> Result<()>
pub fn set_recv_timeout(&self, _timeout: Option<Duration>) -> Result<()>
TODO(b/145998747, b/184398671): this method should be removed.
sourcepub fn into_tube(self) -> Tube
👎Deprecated
pub fn into_tube(self) -> Tube
Never call this function, it is for use by cros_async to provide directional wrapper types only. Using it in any other context may violate concurrency assumptions. (Type splitting across crates has put us in a situation where we can’t use Rust privacy to enforce this.)
Trait Implementations§
source§impl AsRawDescriptor for RecvTube
impl AsRawDescriptor for RecvTube
source§fn as_raw_descriptor(&self) -> RawDescriptor
fn as_raw_descriptor(&self) -> RawDescriptor
Returns the underlying raw descriptor. Read more
source§impl<'de> Deserialize<'de> for RecvTube
impl<'de> Deserialize<'de> for RecvTube
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl ReadNotifier for RecvTube
impl ReadNotifier for RecvTube
source§fn get_read_notifier(&self) -> &dyn AsRawDescriptor
fn get_read_notifier(&self) -> &dyn AsRawDescriptor
Gets a descriptor that can be used in EventContext to wait for events to be available (e.g.
to avoid receive_events blocking).
Auto Trait Implementations§
impl RefUnwindSafe for RecvTube
impl Send for RecvTube
impl Sync for RecvTube
impl Unpin for RecvTube
impl UnwindSafe for RecvTube
Blanket Implementations§
source§impl<T> AsRawDescriptors for Twhere
T: AsRawDescriptor,
impl<T> AsRawDescriptors for Twhere
T: AsRawDescriptor,
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