pub struct GraphStageLogic { /* private fields */ }Implementations§
Source§impl GraphStageLogic
impl GraphStageLogic
pub fn new<S: Shape>(shape: &S) -> Self
pub fn set_handler<P: PortRef>( &mut self, port: &P, handler: Box<dyn InHandler>, ) -> StreamResult<()>
pub fn set_out_handler<P: PortRef>( &mut self, port: &P, handler: Box<dyn OutHandler>, ) -> StreamResult<()>
pub fn drain_async_callbacks(&mut self) -> bool
pub fn pull<T: 'static>(&mut self, inlet: &Inlet<T>) -> StreamResult<()>
pub fn offer<T>(&mut self, inlet: &Inlet<T>, item: T) -> StreamResult<()>
pub fn grab<T>(&mut self, inlet: &Inlet<T>) -> StreamResult<T>where
T: Send + 'static,
pub fn request<T: 'static>(&mut self, outlet: &Outlet<T>) -> StreamResult<()>
pub fn push<T>(&mut self, outlet: &Outlet<T>, item: T) -> StreamResult<()>
pub fn complete<T: 'static>(&mut self, outlet: &Outlet<T>) -> StreamResult<()>
pub fn fail<T: 'static>( &mut self, outlet: &Outlet<T>, cause: StreamError, ) -> StreamResult<()>
pub fn complete_stage(&mut self) -> StreamResult<()>
pub fn fail_stage(&mut self, cause: StreamError) -> StreamResult<()>
pub fn is_available<T: 'static>(&self, outlet: &Outlet<T>) -> bool
pub fn has_been_pulled<T: 'static>(&self, inlet: &Inlet<T>) -> bool
pub fn is_closed<P: PortRef>(&self, port: &P) -> bool
pub fn stage_error(&self) -> Option<&StreamError>
pub fn emit<T: Clone + Send + 'static>( &mut self, outlet: &Outlet<T>, elem: T, ) -> StreamResult<()>
pub fn emit_with_then<T: Clone + Send + 'static>( &mut self, outlet: &Outlet<T>, elem: T, and_then: impl FnOnce() + Send + 'static, ) -> StreamResult<()>
pub fn emit_multiple<T, I>( &mut self, outlet: &Outlet<T>, elems: I, ) -> StreamResult<()>
pub fn emit_multiple_with_then<T, I>( &mut self, outlet: &Outlet<T>, elems: I, and_then: impl FnOnce() + Send + 'static, ) -> StreamResult<()>
pub fn abort_emitting<P: PortRef>(&mut self, port: &P) -> StreamResult<()>
pub fn read<T: Send + 'static>( &mut self, inlet: &Inlet<T>, and_then: impl FnOnce(T) + Send + 'static, on_close: impl FnOnce() + Send + 'static, ) -> StreamResult<()>
pub fn read_n<T: Clone + Send + 'static>( &mut self, inlet: &Inlet<T>, n: usize, and_then: impl FnOnce(Vec<T>) + Send + 'static, on_close: impl FnOnce(Vec<T>) + Send + 'static, ) -> StreamResult<()>
pub fn abort_reading<P: PortRef>(&mut self, port: &P) -> StreamResult<()>
pub fn get_async_callback<F>(&self, handler: F) -> AsyncCallback<F>
pub fn set_log_callback<F>(&mut self, callback: F)
pub fn log(&self, level: &str, message: &str)
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for GraphStageLogic
impl !Sync for GraphStageLogic
impl !UnwindSafe for GraphStageLogic
impl Freeze for GraphStageLogic
impl Send for GraphStageLogic
impl Unpin for GraphStageLogic
impl UnsafeUnpin for GraphStageLogic
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage