Struct go_engine::ffi::types::ChannelObj
source · 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 ) -> impl Future<Output = Result<(), RuntimeError>>
pub async fn recv(&self) -> impl Future<Output = 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 !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