docs

v0.1.2 문서를 보고 있습니다. 이 버전은 더 이상 지원하지 않습니다. 최신 릴리스: v0.1.3 →

core::encoding::hex

API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.

base16 (RFC 4648 section 8): two digits per byte. Decoding takes either case.

Enums

CaseSource

pub enum Case

The case of the digits a to f that encode writes.

Functions

encodeSource

pub fn encode<B: AsBytes>(data: B, case: Case = Case::Lower) -> str

data in hex, two digits per byte.

encode_intoSource

pub fn encode_into<B: AsBytes>(data: B, out: SliceMut<u8>, case: Case = Case::Lower) -> usize

data in hex, written to the front of out; returns how many bytes it wrote (2 * data.len()). Panics if out is shorter.

decodeSource

pub fn decode<B: AsBytes>(text: B) throws (DecodeError) -> List<u8>

The bytes text spells in hex, two digits each (either case).

decode_intoSource

pub fn decode_into<B: AsBytes>(text: B, out: SliceMut<u8>) throws (DecodeError) -> usize

The bytes text spells in hex, written to the front of out; returns how many it wrote (text.len() / 2). Panics if out is shorter.