Skip to main content

SidecarSession

Struct SidecarSession 

Source
pub struct SidecarSession<'a> { /* private fields */ }
Expand description

One stdio connection as seen by a host’s session setup: a SidecarSessionSetup receives it once a sidecar child has started and passed describe validation, and calls SidecarSession::invoke to re-establish whatever session the host had built on the previous connection.

Implementations§

Source§

impl SidecarSession<'_>

Source

pub fn invoke( &self, contract: &str, method: &str, payload: &[u8], ) -> Result<Vec<u8>, ComponentError>

Invoke a bytes-only method on the connection’s component, as crate::LoadedComponent::invoke_bytes does.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for SidecarSession<'a>

§

impl<'a> !UnwindSafe for SidecarSession<'a>

§

impl<'a> Forget for SidecarSession<'a>

§

impl<'a> Freeze for SidecarSession<'a>
where &'a SidecarProcess: Freeze,

§

impl<'a> Move for SidecarSession<'a>

§

impl<'a> Send for SidecarSession<'a>
where &'a SidecarProcess: Send,

§

impl<'a> Sync for SidecarSession<'a>
where Arc<dyn Fn() -> Result<VerifiedFile, ComponentError> + Sync + Send>: Sync, RawVecInner: Sync, Mutex<Child>: Sync, Mutex<Option<Connection>>: Sync, Atomic<bool>: Sync, Arc<dyn Fn(&SidecarSession<'_>) -> Result<(), ComponentError> + Sync + Send>: Sync, Arc<dyn Fn(&str, u32) + Sync + Send>: Sync, Atomic<u32>: Sync, Mutex<()>: Sync,

§

impl<'a> Unpin for SidecarSession<'a>
where &'a SidecarProcess: Unpin,

§

impl<'a> UnsafeUnpin for SidecarSession<'a>
where &'a SidecarProcess: 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<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> 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.