pub struct EstablishSession;Expand description
Session admission transport; the host binds it to its authenticated update.
Implementations§
Source§impl EstablishSession
impl EstablishSession
Sourcepub const ID: u64 = 0x415554480012
pub const ID: u64 = 0x415554480012
Fixed routing identity, not an authentication or signing domain.
Sourcepub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS
pub const REQUEST_LIMITS: Limits = CREDENTIAL_LIMITS
Complete request encoding and decoding allowances.
Sourcepub const RESPONSE_LIMITS: Limits = REPLY_LIMITS
pub const RESPONSE_LIMITS: Limits = REPLY_LIMITS
Complete response encoding and decoding allowances.
Sourcepub fn encode_request(value: &SessionInput) -> Result<Vec<u8>, Error>
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.
Sourcepub fn decode_request(bytes: &[u8]) -> Result<SessionInput, Error>
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.
Sourcepub fn encode_response(
value: &Result<SessionView, AdmissionRefusal>,
) -> Result<Vec<u8>, Error>
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.
Sourcepub fn decode_response(
bytes: &[u8],
) -> Result<Result<SessionView, AdmissionRefusal>, Error>
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§
impl Forget for EstablishSession
impl Freeze for EstablishSession
impl Move for EstablishSession
impl RefUnwindSafe for EstablishSession
impl Send for EstablishSession
impl Sync for EstablishSession
impl Unpin for EstablishSession
impl UnsafeUnpin for EstablishSession
impl UnwindSafe for EstablishSession
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more