Struct fama::PipeContent

source ·
pub struct PipeContent(/* private fields */);

Implementations§

source§

impl PipeContent

source

pub fn new<T>(content: T) -> Selfwhere T: Clone + Send + Sync + 'static,

source

pub fn container(&self) -> &Arc<ServiceContainer>

Returns a busybody’s ServiceContainer

source

pub fn store<T: Clone + Send + Sync + 'static>(&self, data: T) -> &Self

source

pub fn stop_the_flow(&self)

Notify the pipeline to stop flowing the content

source

pub fn stop(&self)

Alias for stop_the_flow

Trait Implementations§

source§

impl Clone for PipeContent

source§

fn clone(&self) -> PipeContent

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for PipeContent

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Injectable for PipeContent

source§

fn inject<'life0, 'async_trait>( c: &'life0 ServiceContainer ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

The required method that makes a type injectable
source§

fn instance<'async_trait>( ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where Self: Sized + Send + 'async_trait,

Injects and return a concret instance of the injectable type The global service container is used
source§

fn instance_with<'life0, 'async_trait>( container: &'life0 ServiceContainer ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>where 'life0: 'async_trait, Self: Sized + Send + 'async_trait,

Injects and returns a concrete instance of the injectable type The provided container will be used

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere 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 Twhere 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> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

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 Twhere U: TryFrom<T>,

§

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.