fn assemble<E>(mut self) -> Result<BitArray<[T; N], O>, E>
	where E: Error {
		let order =
			self.order.take().ok_or_else(|| E::missing_field("order"))?;
		let head = self.head.take().ok_or_else(|| E::missing_field("head"))?;
		let bits = self.bits.take().ok_or_else(|| E::missing_field("bits"))?;
		let data = self.data.take().ok_or_else(|| E::missing_field("data"))?;

		if order != any::type_name::<O>() {
			return Err(E::invalid_type(Unexpected::Str(order), &self));
		}
		if head != BitIdx::MIN {
			return Err(E::invalid_value(
				Unexpected::Unsigned(head.into_inner() as u64),
				&"`BitArray` must have a head-bit of `0`",
			));
		}
		let bits = bits as usize;
		if bits != bits_of::<[T; N]>() {
			return Err(E::invalid_length(bits, &self));
		}

		Ok(BitArray::new(data.inner))
	}
/// Attempts to assemble deserialized components into an output value.
Attempts to assemble deserialized components into an output value.
Attempts to assemble deserialized components into an output value .
fn assemble<E>(mut self) -> Result<BitArray<[T; N], O>, E>
	where E: Error {
		let order =
			self.order.take().ok_or_else(|| E::missing_field("order"))?;
		let head = self.head.take().ok_or_else(|| E::missing_field("head"))?;
		let bits = self.bits.take().ok_or_else(|| E::missing_field("bits"))?;
		let data = self.data.take().ok_or_else(|| E::missing_field("data"))?;
		if order != any::type_name::<O>() {
			return Err(E::invalid_type(Unexpected::Str(order), &self));
		}
		if head != BitIdx::MIN {
			return Err(E::invalid_value(
				Unexpected::Unsigned(head.into_inner() as u64),
				&"`BitArray` must have a head-bit of `0`",
			));
		}
		let bits = bits as usize;
		if bits != bits_of::<[T; N]>() {
			return Err(E::invalid_length(bits, &self));
		}
		Ok(BitArray::new(data.inner))
	}
fn assemble < E > ( mut self ) -> Result < BitArray < [ T ; N ] , O > , E > where E : Error { let order = self . order . take ( ) . ok_or_else ( | | E :: missing_field ( " " ) ) ? ; let head = self . head . take ( ) . ok_or_else ( | | E :: missing_field ( " " ) ) ? ; let bits = self . bits . take ( ) . ok_or_else ( | | E :: missing_field ( " " ) ) ? ; let data = self . data . take ( ) . ok_or_else ( | | E :: missing_field ( " " ) ) ? ; if order != any :: type_name :: < O > ( ) { return Err ( E :: invalid_type ( Unexpected :: Str ( order ) , & self ) ) ; } if head != BitIdx :: MIN { return Err ( E :: invalid_value ( Unexpected :: Unsigned ( head . into_inner ( ) as u64 ) , & " " , ) ) ; } let bits = bits as usize ; if bits != bits_of :: < [ T ; N ] > ( ) { return Err ( E :: invalid_length ( bits , & self ) ) ; } Ok ( BitArray :: new ( data . inner ) ) }
Attempts to assemble deserialized components into an output value.
Attempts to assemble deserialized components into an output value .
mut self
mut self