pub struct SendTube(pub(crate) Tube);
Expand description
A Tube end which can only send messages. Cloneable.
Tuple Fields§
§0: Tube
Implementations§
source§impl SendTube
impl SendTube
sourcepub fn set_send_timeout(&self, _timeout: Option<Duration>) -> Result<()>
pub fn set_send_timeout(&self, _timeout: Option<Duration>) -> Result<()>
TODO(b/145998747, b/184398671): this method should be removed.
pub fn send<T: Serialize>(&self, msg: &T) -> Result<()>
pub fn try_clone(&self) -> Result<Self>
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 SendTube
impl AsRawDescriptor for SendTube
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 SendTube
impl<'de> Deserialize<'de> for SendTube
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
Auto Trait Implementations§
impl RefUnwindSafe for SendTube
impl Send for SendTube
impl Sync for SendTube
impl Unpin for SendTube
impl UnwindSafe for SendTube
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