Skip to main content

WcharFraming

Enum WcharFraming 

Source
pub enum WcharFraming {
    Fixed,
    GiopLengthPrefixed,
    GiopLengthPrefixedMemberOnly,
}
Expand description

How a wchar is framed.

The byte-layer half of zerodds_ast_layout::WcharFraming, which carries the run: all five DDS implementations write XTypes 1.3 Table 31’s fixed-width code unit, and omniORB 4.3.3, TAO 2.5.24 and JacORB 3.9 all write CORBA 3.3 part 2 §9.3.1.6’s GIOP 1.2 form instead — an octet saying how many octets follow, then that many, aligned to one.

It is not a width. A wchar that carries its own count is one octet longer and aligns to one, so every member behind it moves; a reader that had the width right and the framing wrong would take the count octet for half a character and return a different one.

It is not a property of the type either. TAO writes the count octet for a wchar member and a bare unit for a wchar inside an array or a sequence, so the framing is answered per WcharPosition and every entry point that writes or reads one takes the position as an argument.

Variants§

§

Fixed

A fixed-width code unit, aligned to its own width. Table 31.

§

GiopLengthPrefixed

One octet of length, then that many octets, aligned to one, in every position. CORBA §9.3.1.6’s GIOP 1.2 wchar, as omniORB and JacORB write it.

§

GiopLengthPrefixedMemberOnly

The count octet for a member, a bare fixed-width unit for a collection element. TAO 2.5.24.

Implementations§

Source§

impl WcharFraming

Source

pub const fn has_length_octet(self, position: WcharPosition) -> bool

Whether a wchar in this position carries its own octet count.

Trait Implementations§

Source§

impl Clone for WcharFraming

Source§

fn clone(&self) -> Self

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 Copy for WcharFraming

Source§

impl Debug for WcharFraming

Source§

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

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

impl Default for WcharFraming

Source§

fn default() -> Self

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

impl Eq for WcharFraming

Source§

impl PartialEq for WcharFraming

Source§

fn eq(&self, other: &Self) -> 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 WcharFraming

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