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: DocThe comment above it.
name: StringIts name.
sample: T::TypeThe type of the value being coded.
held: HandoffHow the sample arrives. See Handoff.
writing: boolWhether this is the writing direction.
tolerate_unused: boolWhether 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>where
<T as CodecTarget>::Type: RefUnwindSafe,
Vec<(<T as CodecTarget>::Type, String)>: RefUnwindSafe,
Option<<T as CodecTarget>::Block>: RefUnwindSafe,
T: ?Sized,
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>where
<T as CodecTarget>::Type: UnsafeUnpin,
Vec<(<T as CodecTarget>::Type, String)>: UnsafeUnpin,
Option<<T as CodecTarget>::Block>: UnsafeUnpin,
T: ?Sized,
impl<T> UnwindSafe for Routine<T>where
<T as CodecTarget>::Type: UnwindSafe,
Vec<(<T as CodecTarget>::Type, String)>: UnwindSafe,
Option<<T as CodecTarget>::Block>: UnwindSafe,
T: ?Sized,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more