pub struct ChannelObj {
pub recv_zero: GosValue,
pub chan: Channel,
}
Fields§
§recv_zero: GosValue
§chan: Channel
Implementations§
Source§impl ChannelObj
impl ChannelObj
pub fn new(cap: usize, recv_zero: GosValue) -> ChannelObj
pub fn with_chan(chan: Channel, recv_zero: GosValue) -> ChannelObj
pub fn len(&self) -> usize
pub fn cap(&self) -> usize
pub fn close(&self)
pub async fn send(&self, v: &GosValue) -> Result<(), RuntimeError>
pub async fn recv(&self) -> Option<GosValue>
Trait Implementations§
Source§impl Clone for ChannelObj
impl Clone for ChannelObj
Source§fn clone(&self) -> ChannelObj
fn clone(&self) -> ChannelObj
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ChannelObj
impl !RefUnwindSafe for ChannelObj
impl !Send for ChannelObj
impl !Sync for ChannelObj
impl Unpin for ChannelObj
impl !UnwindSafe for ChannelObj
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