Skip to main content

Projected

Struct Projected 

Source
pub struct Projected<'a, T> {
    pub core: T,
    pub extensions: Extensions<'a>,
}
Expand description

A manually projected message with a positional core and a sparse root block.

Fields§

§core: T

Positional fields in their declared order.

§extensions: Extensions<'a>

Staged sparse fields at the root of the message.

Implementations§

Source§

impl<'a, T> Projected<'a, T>

Source

pub const fn new(core: T, extensions: Extensions<'a>) -> Self

Assemble a message with its staged root fields.

Source

pub const fn empty(core: T) -> Self

Assemble a message whose writer supplies no root extensions.

Trait Implementations§

Source§

impl<'de: 'a, 'a, T: Deserialize<'de>> Deserialize<'de> for Projected<'a, T>

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<T: Serialize> Serialize for Projected<'_, T>

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a, T> Forget for Projected<'a, T>

§

impl<'a, T> Freeze for Projected<'a, T>
where T: Freeze, &'a [u8]: Freeze,

§

impl<'a, T> Move for Projected<'a, T>

§

impl<'a, T> RefUnwindSafe for Projected<'a, T>
where T: RefUnwindSafe,

§

impl<'a, T> Send for Projected<'a, T>
where T: Send, &'a [u8]: Send,

§

impl<'a, T> Sync for Projected<'a, T>
where T: Sync,

§

impl<'a, T> Unpin for Projected<'a, T>
where T: Unpin, &'a [u8]: Unpin,

§

impl<'a, T> UnsafeUnpin for Projected<'a, T>
where T: UnsafeUnpin, &'a [u8]: UnsafeUnpin,

§

impl<'a, T> UnwindSafe for Projected<'a, T>
where T: UnwindSafe, &'a [u8]: UnwindSafe,

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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.