Skip to main content

EstablishSession

Struct EstablishSession 

Source
pub struct EstablishSession;
Expand description

Session admission transport; the host binds it to its authenticated update.

Implementations§

Source§

impl EstablishSession

Source

pub const ID: u64 = 0x415554480012

Fixed routing identity, not an authentication or signing domain.

Source

pub const NAME: &'static str = "establish_portable_session"

Contract name used by generated clients. The credential envelope has no endpoint.

Source

pub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS

Complete request encoding and decoding allowances.

Source

pub const RESPONSE_LIMITS: Limits = REPLY_LIMITS

Complete response encoding and decoding allowances.

Source

pub fn encode_request(value: &SessionInput) -> Result<Vec<u8>, Error>

Encode this request within all four resource allowances.

§Errors

Returns the supplier’s codec error if admission fails.

Source

pub fn decode_request(bytes: &[u8]) -> Result<SessionInput, Error>

Decode only this contract’s request frame, without establishing trust.

§Errors

Rejects malformed, misrouted, over-budget or trailing input.

Source

pub fn encode_response( value: &Result<SessionView, AdmissionRefusal>, ) -> Result<Vec<u8>, Error>

Encode this method’s reply within all four resource allowances.

§Errors

Returns the supplier’s codec error if admission fails.

Source

pub fn decode_response( bytes: &[u8], ) -> Result<Result<SessionView, AdmissionRefusal>, Error>

Decode a reply without treating it as proof of authority.

§Errors

Rejects malformed, misrouted, over-budget or trailing input.

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

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.