ServEnvironmentRequest

Struct ServEnvironmentRequest 

Source
pub struct ServEnvironmentRequest<'g, 'a> { /* private fields */ }
Expand description

An environment variable request

Implementations§

Source§

impl<'g, 'a> ServEnvironmentRequest<'g, 'a>

Source

pub fn succeed(self) -> Result<()>

Indicate that the request succeeded.

Note that if the peer didn’t request a reply, this call will not do anything.

Source

pub fn fail(self) -> Result<()>

Indicate that the request failed.

Note that if the peer didn’t request a reply, this call will not do anything. Does not need to be called explicitly, also occurs on drop without accept()

Source

pub fn channel(&self) -> ChanNum

Return the associated channel number.

This will correspond to a ChanHandle::num() from a previous ServOpenSession event.

Source

pub fn name(&self) -> Result<&str>

Retrieve the name of the environment variable (from NAME=VALUE pair).

Source

pub fn value(&self) -> Result<&str>

Retrieve the value of the environment variable (from NAME=VALUE pair).

Auto Trait Implementations§

§

impl<'g, 'a> Freeze for ServEnvironmentRequest<'g, 'a>

§

impl<'g, 'a> RefUnwindSafe for ServEnvironmentRequest<'g, 'a>

§

impl<'g, 'a> Send for ServEnvironmentRequest<'g, 'a>

§

impl<'g, 'a> Sync for ServEnvironmentRequest<'g, 'a>

§

impl<'g, 'a> Unpin for ServEnvironmentRequest<'g, 'a>

§

impl<'g, 'a> !UnwindSafe for ServEnvironmentRequest<'g, 'a>

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 = 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.