Struct HGTPMessage

Source
pub struct HGTPMessage {
    pub frame: [u8; 1024],
    pub unbounded: Vec<u8>,
}
Expand description

Any message we send or receive over an HGTP stream

Fields§

§frame: [u8; 1024]§unbounded: Vec<u8>

Implementations§

Source§

impl HGTPMessage

Source

pub fn pack_command(&mut self, value: Command)

Source

pub fn pack_error_code(&mut self, value: HGTPError)

Source

pub fn pack_version(&mut self, value: u16)

Source

pub fn pack_report(&mut self, value: Report)

Source

pub fn pack_method(&mut self, value: Method)

Source

pub fn pack_attribute(&mut self, value: Attribute)

Source

pub fn pack_event(&mut self, value: Event)

Source

pub fn pack_mode(&mut self, value: Mode)

Source

pub fn pack_category(&mut self, value: Category)

Source

pub fn pack_class(&mut self, value: Class)

Source

pub fn pack_context(&mut self, value: Context)

Source

pub fn pack_aspect(&mut self, value: Aspect)

Source

pub fn pack_state(&mut self, value: State)

Source

pub fn pack_precedence(&mut self, value: u16)

Source

pub fn pack_tag(&mut self, value: Tag)

Source

pub fn pack_condition(&mut self, value: Condition)

Source

pub fn pack_instance(&mut self, value: i32)

Source

pub fn pack_offset(&mut self, value: i32)

Source

pub fn pack_time(&mut self, value: OffsetDateTime)

Source

pub fn pack_index(&mut self, value: i64)

Source

pub fn pack_count(&mut self, value: i64)

Source

pub fn pack_parameter(&mut self, value: i64)

Source

pub fn pack_resultant(&mut self, value: i64)

Source

pub fn pack_timeout(&mut self, value: i64)

Source

pub fn pack_entity(&mut self, value: Entity)

Source

pub fn pack_outlet(&mut self, value: Entity)

Source

pub fn pack_auxiliary(&mut self, value: Entity)

Source

pub fn pack_ancillary(&mut self, value: Entity)

Source

pub fn pack_authorization(&mut self, value: Token)

Source

pub fn pack_authority(&mut self, value: Token)

Source

pub fn pack_name(&mut self, value: String255)

Source

pub fn pack_key(&mut self, value: String255)

Source

pub fn pack_bytes(&mut self, value: &[u8])

Source

pub fn pack_value(&mut self, value: &Value)

Source

pub fn pack_error(&mut self, err: &AvesterraError)

Source§

impl HGTPMessage

Source

pub fn unpack_command(&self) -> Result<Command, UnpackError>

Source

pub fn unpack_error_code(&self) -> Result<HGTPError, UnpackError>

Source

pub fn unpack_version(&self) -> u16

Source

pub fn unpack_report(&self) -> Result<Report, UnpackError>

Source

pub fn unpack_method(&self) -> Result<Method, UnpackError>

Source

pub fn unpack_attribute(&self) -> Result<Attribute, UnpackError>

Source

pub fn unpack_event(&self) -> Result<Event, UnpackError>

Source

pub fn unpack_mode(&self) -> Result<Mode, UnpackError>

Source

pub fn unpack_category(&self) -> Result<Category, UnpackError>

Source

pub fn unpack_class(&self) -> Result<Class, UnpackError>

Source

pub fn unpack_context(&self) -> Result<Context, UnpackError>

Source

pub fn unpack_aspect(&self) -> Result<Aspect, UnpackError>

Source

pub fn unpack_state(&self) -> Result<State, UnpackError>

Source

pub fn unpack_precedence(&self) -> u16

Source

pub fn unpack_tag(&self) -> Result<Tag, UnpackTagError>

Source

pub fn unpack_condition(&self) -> Result<Condition, UnpackError>

Source

pub fn unpack_instance(&self) -> i32

Source

pub fn unpack_offset(&self) -> i32

Source

pub fn unpack_time(&self) -> Result<OffsetDateTime, UnpackError>

Source

pub fn unpack_index(&self) -> i64

Source

pub fn unpack_count(&self) -> i64

Source

pub fn unpack_extension(&self) -> i64

Source

pub fn unpack_parameter(&self) -> i64

Source

pub fn unpack_resultant(&self) -> i64

Source

pub fn unpack_timeout(&self) -> i64

Source

pub fn unpack_entity(&self) -> Entity

Source

pub fn unpack_outlet(&self) -> Entity

Source

pub fn unpack_auxiliary(&self) -> Entity

Source

pub fn unpack_ancillary(&self) -> Entity

Source

pub fn unpack_authorization(&self) -> Token

Source

pub fn unpack_authority(&self) -> Token

Source

pub fn unpack_name(&self) -> Result<String255, UnpackError>

Source

pub fn unpack_key(&self) -> Result<String255, UnpackError>

Source

pub fn unpack_bytes(&self) -> &[u8]

Source

pub fn unpack_value(&self) -> Result<Value, UnpackError>

Source§

impl HGTPMessage

Source

pub fn pretty_print(&self) -> String

Trait Implementations§

Source§

impl Debug for HGTPMessage

Source§

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

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

impl Default for HGTPMessage

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl TryFrom<&HGTPMessage> for AdapterArgs

Source§

type Error = UnpackError

The type returned in the event of a conversion error.
Source§

fn try_from(msg: &HGTPMessage) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl TryFrom<&HGTPMessage> for WaiterEvent

Source§

type Error = UnpackError

The type returned in the event of a conversion error.
Source§

fn try_from(msg: &HGTPMessage) -> Result<Self, Self::Error>

Performs the conversion.

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

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V