Skip to main content

Frame

Enum Frame 

Source
pub enum Frame {
Show 21 variants Hello, Welcome { session_id: SessionId, }, SessionRejected { code: ErrorCode, message: String, }, Publish { request_id: u64, destination: Destination, access_token: BearerToken, }, Published { request_id: u64, binding_id: BindingId, }, PublishFailed { request_id: u64, code: ErrorCode, message: String, }, Unpublish { request_id: u64, binding_id: BindingId, }, Unpublished { request_id: u64, }, Dial { connection_id: u64, destination: Destination, access_token: BearerToken, }, Offer { pipe_id: PipeId, binding_id: BindingId, destination: Destination, }, OfferAccepted { pipe_id: PipeId, }, OfferRejected { pipe_id: PipeId, code: ErrorCode, message: String, }, Opened { pipe_id: PipeId, }, DialFailed { connection_id: u64, code: ErrorCode, observation: PeerObservation, message: String, }, Data { pipe_id: PipeId, payload: Bytes, }, Fin { pipe_id: PipeId, }, Close { pipe_id: PipeId, }, Reset { pipe_id: PipeId, code: ErrorCode, message: String, }, Ping { nonce: u64, }, Pong { nonce: u64, }, Cancel { pipe_id: PipeId, },
}
Expand description

Wire messages exchanged within one SDK–Gateway session.

Credentials are operation-scoped and appear only in Frame::Publish and Frame::Dial; application data remains opaque in Frame::Data.

Variants§

§

Hello

§

Welcome

Fields

§session_id: SessionId
§

SessionRejected

Fields

§message: String
§

Publish

Fields

§request_id: u64
§destination: Destination
§access_token: BearerToken
§

Published

Fields

§request_id: u64
§binding_id: BindingId
§

PublishFailed

Fields

§request_id: u64
§message: String
§

Unpublish

Fields

§request_id: u64
§binding_id: BindingId
§

Unpublished

Fields

§request_id: u64
§

Dial

Fields

§connection_id: u64
§destination: Destination
§access_token: BearerToken
§

Offer

Offers an incoming Pipe to the session that owns a selected binding.

Fields

§pipe_id: PipeId
§binding_id: BindingId
§destination: Destination
§

OfferAccepted

Fields

§pipe_id: PipeId
§

OfferRejected

Fields

§pipe_id: PipeId
§message: String
§

Opened

Confirms that a Pipe is established for the dialing session.

Fields

§pipe_id: PipeId
§

DialFailed

Fields

§connection_id: u64
§observation: PeerObservation
§message: String
§

Data

Fields

§pipe_id: PipeId
§payload: Bytes
§

Fin

Half-closes the sender’s write direction of a Pipe.

Fields

§pipe_id: PipeId
§

Close

Closes a Pipe normally in both directions.

Fields

§pipe_id: PipeId
§

Reset

Terminates a Pipe with an error.

Fields

§pipe_id: PipeId
§message: String
§

Ping

Fields

§nonce: u64
§

Pong

Fields

§nonce: u64
§

Cancel

Cancels a pending Pipe establishment attempt.

Fields

§pipe_id: PipeId

Trait Implementations§

Source§

impl Clone for Frame

Source§

fn clone(&self) -> Frame

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Frame

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Encoder<Frame> for FrameCodec

Source§

type Error = ProtocolError

The type of encoding errors. Read more
Source§

fn encode( &mut self, item: Frame, destination: &mut BytesMut, ) -> Result<(), Self::Error>

Encodes a frame into the buffer provided. Read more
Source§

impl Eq for Frame

Source§

impl PartialEq for Frame

Source§

fn eq(&self, other: &Frame) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Frame

Auto Trait Implementations§

§

impl !Freeze for Frame

§

impl RefUnwindSafe for Frame

§

impl Send for Frame

§

impl Sync for Frame

§

impl Unpin for Frame

§

impl UnsafeUnpin for Frame

§

impl UnwindSafe for Frame

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.