Lines Matching full:pub

18 pub type BStr = [u8];
43 pub enum CStrConvertError {
63 pub struct CStr([u8]);
68 pub const fn len(&self) -> usize { in len()
74 pub const fn len_with_nul(&self) -> usize { in len_with_nul()
86 pub const fn is_empty(&self) -> bool { in is_empty()
98 pub unsafe fn from_char_ptr<'a>(ptr: *const core::ffi::c_char) -> &'a Self { in from_char_ptr()
113 pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, CStrConvertError> { in from_bytes_with_nul()
141 pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr { in from_bytes_with_nul_unchecked()
148 pub const fn as_char_ptr(&self) -> *const core::ffi::c_char { in as_char_ptr()
154 pub fn as_bytes(&self) -> &[u8] { in as_bytes()
160 pub const fn as_bytes_with_nul(&self) -> &[u8] { in as_bytes_with_nul()
178 pub fn to_str(&self) -> Result<&str, core::str::Utf8Error> { in to_str()
200 pub unsafe fn as_str_unchecked(&self) -> &str { in as_str_unchecked()
206 pub fn to_cstring(&self) -> Result<CString, AllocError> { in to_cstring()
313 pub trait CStrIndex {}
395 pub(crate) struct RawFormatter {
419 pub(crate) unsafe fn from_ptrs(pos: *mut u8, end: *mut u8) -> Self { in from_ptrs()
434 pub(crate) unsafe fn from_buffer(buf: *mut u8, len: usize) -> Self { in from_buffer()
448 pub(crate) fn pos(&self) -> *mut u8 { in pos()
453 pub(crate) fn bytes_written(&self) -> usize { in bytes_written()
487 pub(crate) struct Formatter(RawFormatter);
496 pub(crate) unsafe fn from_buffer(buf: *mut u8, len: usize) -> Self { in from_buffer()
547 pub struct CString {
553 pub fn try_from_fmt(args: fmt::Arguments<'_>) -> Result<Self, Error> { in try_from_fmt()