Skip to main content

Routine

Struct Routine 

Source
pub struct Routine<T: CodecTarget + ?Sized> {
    pub doc: Doc,
    pub name: String,
    pub sample: T::Type,
    pub held: Handoff,
    pub writing: bool,
    pub tolerate_unused: bool,
    pub extra: Vec<(T::Type, String)>,
    pub body: Option<T::Block>,
}
Expand description

What a codec routine is made of.

A struct rather than a parameter list because the reader takes a parameter the writer does not — the try-construct behaviour, which DDS-XTypes 1.3 §7.2.2.7 attaches to the position rather than to the type — and eight positional arguments is where a caller starts passing them in the wrong order.

Fields§

§doc: Doc

The comment above it.

§name: String

Its name.

§sample: T::Type

The type of the value being coded.

§held: Handoff

How the sample arrives. See Handoff.

§writing: bool

Whether this is the writing direction.

§tolerate_unused: bool

Whether it may legitimately have no caller.

§extra: Vec<(T::Type, String)>

Parameters after the sample, in written order.

§body: Option<T::Block>

The body, absent to ask for a forward declaration.

Auto Trait Implementations§

§

impl<T> Freeze for Routine<T>
where <T as CodecTarget>::Type: Freeze, Vec<(<T as CodecTarget>::Type, String)>: Freeze, Option<<T as CodecTarget>::Block>: Freeze, T: ?Sized,

§

impl<T> RefUnwindSafe for Routine<T>

§

impl<T> Send for Routine<T>
where <T as CodecTarget>::Type: Send, Vec<(<T as CodecTarget>::Type, String)>: Send, Option<<T as CodecTarget>::Block>: Send, T: ?Sized,

§

impl<T> Sync for Routine<T>
where <T as CodecTarget>::Type: Sync, Vec<(<T as CodecTarget>::Type, String)>: Sync, Option<<T as CodecTarget>::Block>: Sync, T: ?Sized,

§

impl<T> Unpin for Routine<T>
where <T as CodecTarget>::Type: Unpin, Vec<(<T as CodecTarget>::Type, String)>: Unpin, Option<<T as CodecTarget>::Block>: Unpin, T: ?Sized,

§

impl<T> UnsafeUnpin for Routine<T>

§

impl<T> UnwindSafe for Routine<T>

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 = !

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.