OGNActor

Struct OGNActor 

Source
pub struct OGNActor { /* private fields */ }
Expand description

An actor that connects to the OGN APRS servers

Implementations§

Trait Implementations§

Source§

impl Actor for OGNActor

Source§

type Context = Context<OGNActor>

Actor execution context type
Source§

fn started(&mut self, ctx: &mut Self::Context)

Called when an actor gets polled the first time.
Source§

fn stopped(&mut self, _: &mut Self::Context)

Called after an actor is stopped. Read more
Source§

fn stopping(&mut self, ctx: &mut Self::Context) -> Running

Called after an actor is in Actor::Stopping state. Read more
Source§

fn start(self) -> Addr<Self>
where Self: Actor<Context = Context<Self>>,

Start a new asynchronous actor, returning its address. Read more
Source§

fn start_in_arbiter<F>(arb: &Arbiter, f: F) -> Addr<Self>
where Self: Actor<Context = Context<Self>>, F: FnOnce(&mut Context<Self>) -> Self + Send + 'static,

Start new actor in arbiter’s thread.
Source§

fn create<F>(f: F) -> Addr<Self>
where Self: Actor<Context = Context<Self>>, F: FnOnce(&mut Context<Self>) -> Self,

Start a new asynchronous actor given a Context. Read more
Source§

impl StreamHandler<Result<String, LinesCodecError>> for OGNActor

Send received lines to the recipient

Source§

fn handle( &mut self, line: Result<String, LinesCodecError>, _: &mut Self::Context, )

Method is called for every message received by this Actor
Source§

fn started(&mut self, ctx: &mut Self::Context)

Method is called when stream get polled first time.
Source§

fn finished(&mut self, ctx: &mut Self::Context)

Method is called when stream finishes. Read more
Source§

fn add_stream<S>(fut: S, ctx: &mut Self::Context) -> SpawnHandle
where Self::Context: AsyncContext<Self>, S: Stream<Item = I> + 'static, I: 'static,

This method register stream to an actor context and allows to handle Stream in similar way as normal actor messages. Read more
Source§

impl Supervised for OGNActor

Source§

fn restarting(&mut self, _: &mut Self::Context)

Called when the supervisor restarts a failed actor.
Source§

impl WriteHandler<LinesCodecError> for OGNActor

Source§

fn error(&mut self, err: LinesCodecError, _: &mut Self::Context) -> Running

Called when the writer emits error. Read more
Source§

fn finished(&mut self, ctx: &mut Self::Context)

Called when the writer finishes. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V