ascii 1.1.0
README badge
[](https://proofs.rs/crate/ascii?version=1.1.0)ASCII-only equivalents to `char`, `str` and `String`.
Reports (1)
Findings (0)
No findings reported for this version.
APIs (405)
APIClaims · findings
Functions
pub fn caret_decode<C: Copy + Into<u8>>(c: C) -> Option<ascii_char::AsciiChar>—pub fn caret_encode<C: Copy + Into<u8>>(c: C) -> Option<ascii_char::AsciiChar>—Associated functions
impl AsciiChar
pub fn from_ascii<C: ToAsciiChar>(ch: C) -> Result<Self, ToAsciiCharError>1 claimpub unsafe fn from_ascii_unchecked(ch: u8) -> Self—pub const fn new(ch: char) -> AsciiChar—impl AsciiStr
pub fn from_ascii<B>(bytes: &B) -> Result<&AsciiStr, AsAsciiStrError> where B: AsRef<[u8]> + ?Sized—pub unsafe fn from_ascii_unchecked(bytes: &[u8]) -> &AsciiStr—impl AsciiString
pub fn from_ascii<B>(bytes: B) -> Result<AsciiString, FromAsciiError<B>> where B: Into<Vec<u8>> + AsRef<[u8]>—pub unsafe fn from_ascii_unchecked<B>(bytes: B) -> Self where B: Into<Vec<u8>>—pub unsafe fn from_raw_parts(buf: *mut AsciiChar, length: usize, capacity: usize) -> Self—pub fn with_capacity(capacity: usize) -> Self—Methods
impl AsAsciiStrError
pub const fn valid_up_to(self: Self) -> usize1 claimimpl AsciiChar
pub const fn as_char(self: Self) -> char—pub fn as_printable_char(self: Self) -> char—pub const fn eq_ignore_ascii_case(self: &Self, other: &Self) -> bool1 claimpub const fn is_alphabetic(self: Self) -> bool1 claimpub const fn is_alphanumeric(self: Self) -> bool1 claimpub const fn is_ascii_alphabetic(self: &Self) -> bool1 claimpub const fn is_ascii_alphanumeric(self: &Self) -> bool1 claimpub const fn is_ascii_blank(self: &Self) -> bool1 claimpub const fn is_ascii_control(self: &Self) -> bool1 claimpub const fn is_ascii_digit(self: &Self) -> bool1 claimpub const fn is_ascii_graphic(self: &Self) -> bool1 claimpub const fn is_ascii_hexdigit(self: &Self) -> bool1 claimpub const fn is_ascii_lowercase(self: &Self) -> bool1 claimpub const fn is_ascii_printable(self: &Self) -> bool1 claimpub const fn is_ascii_punctuation(self: &Self) -> bool1 claimpub const fn is_ascii_uppercase(self: &Self) -> bool1 claimpub const fn is_ascii_whitespace(self: &Self) -> bool1 claimpub const fn is_lowercase(self: Self) -> bool1 claimpub const fn is_uppercase(self: Self) -> bool1 claimpub const fn is_whitespace(self: Self) -> bool1 claimpub fn make_ascii_lowercase(self: &mut Self)—pub fn make_ascii_uppercase(self: &mut Self)—pub const fn to_ascii_lowercase(self: &Self) -> Self—pub const fn to_ascii_uppercase(self: &Self) -> Self—impl AsciiStr
pub fn as_bytes(self: &Self) -> &[u8]—pub fn as_mut_ptr(self: &mut Self) -> *mut AsciiChar—pub fn as_mut_slice(self: &mut Self) -> &mut [AsciiChar]1 claimpub const fn as_ptr(self: &Self) -> *const AsciiChar—pub fn as_str(self: &Self) -> &str—pub fn chars(self: &Self) -> Chars<'_>—pub fn chars_mut(self: &mut Self) -> CharsMut<'_>—pub fn eq_ignore_ascii_case(self: &Self, other: &Self) -> bool—pub fn first(self: &Self) -> Option<AsciiChar>—pub fn into_ascii_string(self: Box<Self>) -> AsciiString—pub fn last(self: &Self) -> Option<AsciiChar>—pub fn lines(self: &Self) -> impl DoubleEndedIterator<Item = &AsciiStr>—pub fn make_ascii_lowercase(self: &mut Self)—pub fn make_ascii_uppercase(self: &mut Self)—pub fn split(self: &Self, on: AsciiChar) -> impl DoubleEndedIterator<Item = &AsciiStr>—pub fn to_ascii_lowercase(self: &Self) -> AsciiString—pub fn to_ascii_string(self: &Self) -> AsciiString—pub fn to_ascii_uppercase(self: &Self) -> AsciiString—pub fn trim(self: &Self) -> &Self—pub fn trim_end(self: &Self) -> &Self—pub fn trim_start(self: &Self) -> &Self—impl AsciiString
pub fn capacity(self: &Self) -> usize—pub fn clear(self: &mut Self)—pub fn insert(self: &mut Self, idx: usize, ch: AsciiChar)—pub fn insert_str(self: &mut Self, idx: usize, string: &AsciiStr)—pub fn into_boxed_ascii_str(self: Self) -> Box<AsciiStr>—pub fn pop(self: &mut Self) -> Option<AsciiChar>—pub fn push_str(self: &mut Self, string: &AsciiStr)—pub fn remove(self: &mut Self, idx: usize) -> AsciiChar—pub fn reserve(self: &mut Self, additional: usize)—pub fn reserve_exact(self: &mut Self, additional: usize)—pub fn shrink_to_fit(self: &mut Self)—pub fn truncate(self: &mut Self, new_len: usize)—impl Chars<'a>
pub fn as_str(self: &Self) -> &'a AsciiStr—impl CharsMut<'a>
pub fn into_str(self: Self) -> &'a mut AsciiStr—impl CharsRef<'a>
pub fn as_str(self: &Self) -> &'a AsciiStr—impl FromAsciiError<O>
pub fn ascii_error(self: &Self) -> AsAsciiStrError1 claimpub fn into_source(self: Self) -> O1 claimTraits
trait AsAsciiStr
pub fn as_ascii_str(self: &Self) -> Result<&AsciiStr, AsAsciiStrError>—pub unsafe fn as_ascii_str_unchecked(self: &Self) -> &AsciiStr—pub fn get_ascii(self: &Self, index: usize) -> Option<AsciiChar>—pub fn slice_ascii<R>(self: &Self, range: R) -> Result<&AsciiStr, AsAsciiStrError> where R: SliceIndex<[<Self as ascii::ascii_str::AsAsciiStr>::Inner], Output = [<Self as ascii::ascii_str::AsAsciiStr>::Inner]>—trait AsMutAsciiStr
pub fn as_mut_ascii_str(self: &mut Self) -> Result<&mut AsciiStr, AsAsciiStrError>—pub unsafe fn as_mut_ascii_str_unchecked(self: &mut Self) -> &mut AsciiStr—pub fn slice_ascii_mut<R>(self: &mut Self, range: R) -> Result<&mut AsciiStr, AsAsciiStrError> where R: SliceIndex<[<Self as ascii::ascii_str::AsAsciiStr>::Inner], Output = [<Self as ascii::ascii_str::AsAsciiStr>::Inner]>—trait IntoAsciiString
pub fn into_ascii_string(self: Self) -> Result<AsciiString, FromAsciiError<Self>>—pub unsafe fn into_ascii_string_unchecked(self: Self) -> AsciiString—trait ToAsciiChar
pub fn to_ascii_char(self: Self) -> Result<AsciiChar, ToAsciiCharError>—pub unsafe fn to_ascii_char_unchecked(self: Self) -> AsciiChar—Trait implementations
impl alloc::borrow::ToOwned for AsciiStr
pub fn to_owned(self: &Self) -> AsciiString—impl ascii::AsAsciiStr for …
fn as_ascii_str7 implementations1 claim
unsafe fn as_ascii_str_unchecked7 implementations1 claim
unsafe impl ascii::AsAsciiStr for &'a T—
unsafe impl ascii::AsAsciiStr for [u8]—
unsafe impl ascii::AsAsciiStr for str—
fn get_ascii7 implementations—
impl ascii::AsMutAsciiStr for …
fn as_mut_ascii_str5 implementations—
unsafe fn as_mut_ascii_str_unchecked5 implementations1 claim
impl ascii::IntoAsciiString for …
fn into_ascii_string11 implementations1 claim
unsafe fn into_ascii_string_unchecked11 implementations1 claim
impl ascii::ToAsciiChar for …
fn to_ascii_char6 implementations1 claim
unsafe fn to_ascii_char_unchecked6 implementations1 claim
impl core::borrow::Borrow<ascii::AsciiStr> for AsciiString
fn borrow2 implementations—
impl core::borrow::BorrowMut<ascii::AsciiStr> for AsciiString
fn borrow_mut2 implementations—
impl core::clone::Clone for …
fn clone7 implementations—
impl core::cmp::Ord for …
fn cmp3 implementations—
impl core::cmp::PartialEq for …
impl core::cmp::PartialEq<&ascii::AsciiStr> for AsciiString
impl core::cmp::PartialEq<&str> for AsciiString
pub fn eq(self: &Self, other: &&str) -> bool—impl core::cmp::PartialEq<[ascii::AsciiChar]> for AsciiStr
pub fn eq(self: &Self, other: &[AsciiChar]) -> bool—impl core::cmp::PartialEq<[u8]> for AsciiStr
pub fn eq(self: &Self, other: &[u8]) -> bool—impl core::cmp::PartialEq<alloc::string::String> for …
impl core::cmp::PartialEq<ascii::AsciiChar> for char
pub fn eq(self: &Self, rhs: &AsciiChar) -> bool—impl core::cmp::PartialEq<ascii::AsciiStr> for [ascii::AsciiChar]
pub fn eq(self: &Self, other: &AsciiStr) -> bool—impl core::cmp::PartialEq<ascii::AsciiString> for …
impl core::cmp::PartialEq<char> for AsciiChar
pub fn eq(self: &Self, rhs: &char) -> bool—impl core::cmp::PartialEq<str> for …
fn eq2 implementations—
impl core::cmp::PartialEq<u8> for AsciiChar
pub fn eq(self: &Self, rhs: &u8) -> bool—impl core::cmp::PartialOrd for …
fn partial_cmp3 implementations—
impl core::cmp::PartialOrd<ascii::AsciiChar> for char
pub fn partial_cmp(self: &Self, rhs: &AsciiChar) -> Option<Ordering>—impl core::cmp::PartialOrd<char> for AsciiChar
pub fn partial_cmp(self: &Self, rhs: &char) -> Option<Ordering>—impl core::cmp::PartialOrd<u8> for AsciiChar
pub fn partial_cmp(self: &Self, rhs: &u8) -> Option<Ordering>—impl core::convert::AsMut<[ascii::AsciiChar]> for …
impl core::convert::AsMut<ascii::AsciiStr> for AsciiString
fn as_mut2 implementations—
impl core::convert::AsRef<[ascii::AsciiChar]> for …
impl core::convert::AsRef<[u8]> for …
fn as_ref2 implementations—
impl core::convert::AsRef<ascii::AsciiStr> for …
impl core::convert::AsRef<str> for …
fn as_ref2 implementations—
impl core::convert::From<&'a [ascii::AsciiChar]> for …
impl core::convert::From<&'a ascii::AsciiStr> for …
impl core::convert::From<&'a mut [ascii::AsciiChar]> for &'a mut ascii::AsciiStr
pub fn from(slice: &mut [AsciiChar]) -> &mut AsciiStr—impl core::convert::From<&'a mut ascii::AsciiStr> for &'a mut [ascii::AsciiChar]
pub fn from(astr: &mut AsciiStr) -> &mut [AsciiChar]—impl core::convert::From<alloc::borrow::Cow<'a, ascii::AsciiStr>> for AsciiString
pub fn from(cow: Cow<'a, AsciiStr>) -> AsciiString—impl core::convert::From<alloc::boxed::Box<[ascii::AsciiChar]>> for alloc::boxed::Box<ascii::AsciiStr>
pub fn from(owned: Box<[AsciiChar]>) -> Box<AsciiStr>—impl core::convert::From<alloc::boxed::Box<ascii::AsciiStr>> for AsciiString
impl core::convert::From<alloc::vec::Vec<ascii::AsciiChar>> for AsciiString
pub fn from(vec: Vec<AsciiChar>) -> Self—impl core::convert::From<ascii::AsciiChar> for AsciiString
impl core::convert::From<ascii::AsciiString> for …
impl core::default::Default for …
impl core::error::Error for …
pub fn cause(self: &Self) -> Option<&dyn Error>—fn description3 implementations—
impl core::fmt::Debug for …
fn fmt9 implementations—
impl core::fmt::Display for …
impl core::fmt::Write for AsciiString
pub fn write_char(self: &mut Self, c: char) -> fmt::Result—pub fn write_str(self: &mut Self, s: &str) -> fmt::Result—impl core::hash::Hash for …
fn hash3 implementations—
impl core::iter::traits::collect::Extend<A> for AsciiString
pub fn extend<I: IntoIterator<Item = A>>(self: &mut Self, iterable: I)—impl core::iter::traits::collect::FromIterator<A> for AsciiString
pub fn from_iter<I: IntoIterator<Item = A>>(iter: I) -> AsciiString—impl core::iter::traits::collect::IntoIterator for &'a mut ascii::AsciiStr
pub fn into_iter(self: Self) -> <Self as core::iter::traits::collect::IntoIterator>::IntoIter—impl core::iter::traits::double_ended::DoubleEndedIterator for …
impl core::iter::traits::exact_size::ExactSizeIterator for …
impl core::iter::traits::iterator::Iterator for …
fn next3 implementations—
impl core::ops::arith::Add<&'a ascii::AsciiStr> for AsciiString
impl core::ops::arith::AddAssign<&'a ascii::AsciiStr> for AsciiString
impl core::ops::deref::Deref for AsciiString
pub fn deref(self: &Self) -> &AsciiStr—impl core::ops::deref::DerefMut for AsciiString
pub fn deref_mut(self: &mut Self) -> &mut AsciiStr—impl core::ops::index::Index<T> for AsciiString
pub fn index(self: &Self, index: T) -> &<AsciiStr as Index<T>>::Output—impl core::ops::index::Index<core::ops::range::Range<usize>> for AsciiStr
pub fn index(self: &Self, index: Range<usize>) -> &AsciiStr—impl core::ops::index::Index<core::ops::range::RangeFrom<usize>> for AsciiStr
pub fn index(self: &Self, index: RangeFrom<usize>) -> &AsciiStr—impl core::ops::index::Index<core::ops::range::RangeFull> for AsciiStr
pub fn index(self: &Self, index: RangeFull) -> &AsciiStr—impl core::ops::index::Index<core::ops::range::RangeInclusive<usize>> for AsciiStr
pub fn index(self: &Self, index: RangeInclusive<usize>) -> &AsciiStr—impl core::ops::index::Index<core::ops::range::RangeTo<usize>> for AsciiStr
pub fn index(self: &Self, index: RangeTo<usize>) -> &AsciiStr—impl core::ops::index::Index<core::ops::range::RangeToInclusive<usize>> for AsciiStr
pub fn index(self: &Self, index: RangeToInclusive<usize>) -> &AsciiStr—impl core::ops::index::Index<usize> for AsciiStr
pub fn index(self: &Self, index: usize) -> &AsciiChar—impl core::ops::index::IndexMut<T> for AsciiString
pub fn index_mut(self: &mut Self, index: T) -> &mut <AsciiStr as Index<T>>::Output—impl core::ops::index::IndexMut<core::ops::range::Range<usize>> for AsciiStr
pub fn index_mut(self: &mut Self, index: Range<usize>) -> &mut AsciiStr—impl core::ops::index::IndexMut<core::ops::range::RangeFrom<usize>> for AsciiStr
pub fn index_mut(self: &mut Self, index: RangeFrom<usize>) -> &mut AsciiStr—impl core::ops::index::IndexMut<core::ops::range::RangeFull> for AsciiStr
pub fn index_mut(self: &mut Self, index: RangeFull) -> &mut AsciiStr—impl core::ops::index::IndexMut<core::ops::range::RangeInclusive<usize>> for AsciiStr
pub fn index_mut(self: &mut Self, index: RangeInclusive<usize>) -> &mut AsciiStr—impl core::ops::index::IndexMut<core::ops::range::RangeTo<usize>> for AsciiStr
pub fn index_mut(self: &mut Self, index: RangeTo<usize>) -> &mut AsciiStr—impl core::ops::index::IndexMut<core::ops::range::RangeToInclusive<usize>> for AsciiStr
pub fn index_mut(self: &mut Self, index: RangeToInclusive<usize>) -> &mut AsciiStr—impl core::ops::index::IndexMut<usize> for AsciiStr
pub fn index_mut(self: &mut Self, index: usize) -> &mut AsciiChar—impl core::str::traits::FromStr for AsciiString
pub fn from_str(s: &str) -> Result<AsciiString, AsAsciiStrError>—