Skip to main content

WireTable

Struct WireTable 

Source
pub struct WireTable<C> { /* private fields */ }

Implementations§

Source§

impl<C> WireTable<C>
where C: Send + Sync + 'static,

Source

pub fn bind_operation<T>( &mut self, resources: Arc<<T as Operation>::Resources>, ) -> Result<(), ServingError>
where T: for<'a> Operation<Context<'a> = &'a C, Endpoints = ()>,

Source

pub fn bind_resident_operation<T>( &mut self, resources: Arc<<T as Operation>::Resources>, ) -> Result<(), ServingError>
where T: for<'a> Operation<Context<'a> = &'a C, Endpoints = ()>,

Source

pub fn bind_observe_control<T>( &mut self, resources: Arc<<T as Operation>::Resources>, ) -> Result<(), ServingError>
where T: for<'a> Operation<Context<'a> = &'a C, Endpoints = (), Declaration = Control>,

Source

pub fn bind_streaming_operation<T>( &mut self, resources: Arc<<T as Operation>::Resources>, limits: WireStreamLimits, ) -> Result<(), ServingError>
where T: for<'a> Operation<Context<'a> = &'a C>, <T as Operation>::Endpoints: WireEndpoints,

Source§

impl<C> WireTable<C>
where C: Send + Sync + 'static,

Source

pub fn new(capacity: NonZero<usize>) -> WireTable<C>

Source

pub fn of<T, R>( resources: Arc<R>, capacity: NonZero<usize>, ) -> Result<WireTable<C>, ServingError>
where T: Catalog<AuthoredDeclarations> + Catalog<Serves<R, C>>, R: Send + Sync + 'static,

Source

pub fn bind_operations<T, R>( &mut self, resources: Arc<R>, ) -> Result<(), ServingError>
where T: Catalog<AuthoredDeclarations> + Catalog<Serves<R, C>>, R: Send + Sync + 'static,

Source

pub fn bind_streaming_operations<T, R>( &mut self, resources: Arc<R>, limits: WireStreamLimits, ) -> Result<(), ServingError>
where T: Catalog<AuthoredDeclarations> + Catalog<Serves<R, C>>, R: Send + Sync + 'static,

Source

pub fn definitions(&self) -> Vec<Definition>

Source

pub fn validate(&self, definitions: &[Definition]) -> Result<(), ServingError>

Source

pub fn validate_contracts( &self, contracts: &[Contract], ) -> Result<(), ServingError>

Source

pub fn prepare( &mut self, invocation: u64, operation: &str, payload: Vec<u8>, ) -> Result<Vec<u8>, ServingError>

Source

pub fn streams(&self, invocation: u64) -> Result<WireStreams, ServingError>

Source

pub async fn initialize( &mut self, invocation: u64, context: &C, ) -> Result<(), ServingError>

Source

pub async fn attempt( &mut self, invocation: u64, context: &C, ) -> Result<Vec<u8>, ServingError>

Source

pub async fn finalize(&mut self, invocation: u64) -> Result<(), ServingError>

Source

pub fn begin( &mut self, command: WireCommand, context: Arc<C>, ) -> Pin<Box<dyn Future<Output = WireAnswer> + Send>>

Source

pub fn close_ordinary( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send>>

Source

pub fn release_ordinary(&mut self) -> Result<impl Send + use<C>, ServingError>

Source

pub async fn settle_ordinary(&mut self) -> Result<(), ServingError>

Source

pub fn close( &mut self, ) -> Pin<Box<dyn Future<Output = Result<(), ServingError>> + Send>>

Source

pub fn release(&mut self) -> Result<impl Send + use<C>, ServingError>

Source

pub async fn settle(&mut self) -> Result<(), ServingError>

Source

pub fn is_settled(&self) -> bool

Source

pub fn is_closed(&self) -> bool

Source

pub async fn answer(&mut self, command: WireCommand, context: &C) -> WireAnswer

Auto Trait Implementations§

§

impl<C> !RefUnwindSafe for WireTable<C>

§

impl<C> !UnwindSafe for WireTable<C>

§

impl<C> Freeze for WireTable<C>
where BTreeMap<String, Handler<C>>: Freeze, BTreeMap<u64, Arc<Slot<C>>>: Freeze,

§

impl<C> Send for WireTable<C>
where BTreeMap<String, Handler<C>>: Send, BTreeMap<u64, Arc<Slot<C>>>: Send,

§

impl<C> Sync for WireTable<C>
where BTreeMap<String, Handler<C>>: Sync, BTreeMap<u64, Arc<Slot<C>>>: Sync,

§

impl<C> Unpin for WireTable<C>
where BTreeMap<String, Handler<C>>: Unpin, BTreeMap<u64, Arc<Slot<C>>>: Unpin,

§

impl<C> UnsafeUnpin for WireTable<C>
where BTreeMap<String, Handler<C>>: UnsafeUnpin, BTreeMap<u64, Arc<Slot<C>>>: UnsafeUnpin,

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<C, T> Catalogued<C> for T
where T: Into<C>,

Source§

fn catalogued(self) -> C

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Mutual<T> for T

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<R> RecordProjection<R> for R

Source§

fn project(&self) -> Option<&R>

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more