pub struct FormType { /* private fields */ }Expand description
One of an operation’s types as its forms carry it: the tag CH holds, and a packed type’s layout, which reads its record under that tag.
Implementations§
Source§impl FormType
impl FormType
Sourcepub fn of(contract: &Contract, ty: &TypeId) -> Result<FormType, String>
pub fn of(contract: &Contract, ty: &TypeId) -> Result<FormType, String>
ty of contract: a packed type’s tag and layout (core §7.6), and
tag 0 for every other kind, which defines none.
§Errors
A packed type whose artifact the contract does not carry, or whose layout does not resolve.
Sourcepub fn check(&self, tag: Tag, record: &[u8]) -> Result<(), ReadRefusal>
pub fn check(&self, tag: Tag, record: &[u8]) -> Result<(), ReadRefusal>
A record CH carried under tag, checked as its type reads it (core
§7.6): a packed record by its layout, tag first; any other kind’s
taken as it is, its tag reported and never checked (§7.5), its bytes
for its own decoder.
§Errors
The packed reader’s first refusal (ReadRefusal), never its
epoch.
Trait Implementations§
impl Eq for FormType
impl StructuralPartialEq for FormType
Auto Trait Implementations§
impl Forget for FormType
impl Freeze for FormType
impl Move for FormType
impl RefUnwindSafe for FormType
impl Send for FormType
impl Sync for FormType
impl Unpin for FormType
impl UnsafeUnpin for FormType
impl UnwindSafe for FormType
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more