pub struct RawUnit {
pub op: Op,
pub source: RawContentId,
pub span: Span,
pub elided: RawContentId,
pub root: ContentId,
pub depth: u32,
pub life: Life,
}Expand description
The transparent decode target: asserts nothing.
Every field is public and plain. This type is what foreign bytes become, and
it is not usable as a unit until it has been through
[TryFrom<RawUnit> for Unit].
Fields§
§op: OpWhat the bytes claim was done.
source: RawContentIdThe source byte string claimed.
span: SpanThe byte range claimed.
elided: RawContentIdThe addressed material claimed.
root: ContentIdThe root event claimed.
depth: u32The generation depth claimed.
life: LifeThe lifecycle claimed.
Trait Implementations§
impl Copy for RawUnit
Source§impl<'de> Deserialize<'de> for RawUnit
impl<'de> Deserialize<'de> for RawUnit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RawUnit
impl StructuralPartialEq for RawUnit
Source§impl TryFrom<RawUnit> for Unit
impl TryFrom<RawUnit> for Unit
Source§fn try_from(raw: RawUnit) -> Result<Self, Self::Error>
fn try_from(raw: RawUnit) -> Result<Self, Self::Error>
The only way in from foreign bytes.
§Errors
See AdmitError. Span-versus-source is checked by crate::verify,
which needs the bytes this function does not have.
Source§type Error = AdmitError
type Error = AdmitError
The type returned in the event of a conversion error.
Auto Trait Implementations§
impl Freeze for RawUnit
impl RefUnwindSafe for RawUnit
impl Send for RawUnit
impl Sync for RawUnit
impl Unpin for RawUnit
impl UnsafeUnpin for RawUnit
impl UnwindSafe for RawUnit
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