pub struct OwnedString { /* private fields */ }Implementations§
Source§impl OwnedString
impl OwnedString
Sourcepub fn new<S: Into<String>>(s: S) -> Self
pub fn new<S: Into<String>>(s: S) -> Self
§Panics
Panics if the CP437-encoded bytes contain an interior NUL — only
possible when the input string contains a U+0000 character, since
Convert_CodepointToCP437 maps unrepresentable codepoints to '?'.
Also panics if the encoded length exceeds cc_uint16::MAX.
pub fn as_cc_string(&self) -> &cc_string
Sourcepub unsafe fn get_cc_string(&self) -> cc_string
pub unsafe fn get_cc_string(&self) -> cc_string
§Safety
The OwnedString needs to live longer than the cc_string return here.
Trait Implementations§
Source§impl Borrow<cc_string_> for OwnedString
impl Borrow<cc_string_> for OwnedString
Auto Trait Implementations§
impl Freeze for OwnedString
impl RefUnwindSafe for OwnedString
impl !Send for OwnedString
impl !Sync for OwnedString
impl Unpin for OwnedString
impl UnsafeUnpin for OwnedString
impl UnwindSafe for OwnedString
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more