Struct strict_encoding::StructWriter
source · pub struct StructWriter<W: Write, P: StrictParent<W>> { /* private fields */ }
Implementations§
source§impl<W: Write, P: StrictParent<W>> StructWriter<W, P>
impl<W: Write, P: StrictParent<W>> StructWriter<W, P>
pub fn structure<T: StrictStruct>(parent: P) -> Self
pub fn tuple<T: StrictTuple>(parent: P) -> Self
pub fn unnamed(parent: P, tuple: bool) -> Self
pub fn is_tuple(&self) -> bool
pub fn is_struct(&self) -> bool
pub fn named_fields(&self) -> &[FieldName]
pub fn fields_count(&self) -> u8
pub fn name(&self) -> &str
pub fn into_parent(self) -> P
Trait Implementations§
source§impl<W: Debug + Write, P: Debug + StrictParent<W>> Debug for StructWriter<W, P>
impl<W: Debug + Write, P: Debug + StrictParent<W>> Debug for StructWriter<W, P>
source§impl<W: Write, P: StrictParent<W>> DefineStruct for StructWriter<W, P>
impl<W: Write, P: StrictParent<W>> DefineStruct for StructWriter<W, P>
type Parent = P
fn define_field<T: StrictEncode>(self, field: FieldName) -> Self
fn complete(self) -> P
source§impl<W: Write, P: StrictParent<W>> DefineTuple for StructWriter<W, P>
impl<W: Write, P: StrictParent<W>> DefineTuple for StructWriter<W, P>
source§impl<W: Write, P: StrictParent<W>> SplitParent for StructWriter<W, P>
impl<W: Write, P: StrictParent<W>> SplitParent for StructWriter<W, P>
type Parent = P
type Remnant = StructWriter<Sink, ParentDumb>
fn from_parent_split(parent: P, remnant: Self::Remnant) -> Self
fn into_parent_split(self) -> (P, Self::Remnant)
source§impl<W: Write, P: StrictParent<W>> WriteStruct for StructWriter<W, P>
impl<W: Write, P: StrictParent<W>> WriteStruct for StructWriter<W, P>
source§impl<W: Write, P: StrictParent<W>> WriteTuple for StructWriter<W, P>
impl<W: Write, P: StrictParent<W>> WriteTuple for StructWriter<W, P>
type Parent = P
fn write_field(self, value: &impl StrictEncode) -> Result<Self>
fn complete(self) -> P
Auto Trait Implementations§
impl<W, P> RefUnwindSafe for StructWriter<W, P>where
P: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, P> Send for StructWriter<W, P>
impl<W, P> Sync for StructWriter<W, P>
impl<W, P> Unpin for StructWriter<W, P>
impl<W, P> UnwindSafe for StructWriter<W, P>where
P: UnwindSafe,
W: UnwindSafe,
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