MCPcopy Create free account
hub / github.com/ProgrammingRust/examples / from_bytes_unchecked

Method from_bytes_unchecked

ascii/src/lib.rs:50–52  ·  view source on GitHub ↗

Construct an `Ascii` value from `bytes`, without checking whether `bytes` actually contains well-formed ASCII. This constructor is infallible, and returns an `Ascii` directly, rather than a `Result ` as the `from_bytes` constructor does. # Safety The caller must ensure that `bytes` contains only ASCII characters: bytes no greater than 0x7f. Otherwise, the effect is undefine

(bytes: Vec<u8>)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 1

AsciiClass · 0.85

Tested by

no test coverage detected