#[repr(C)]pub struct CString<const S: usize> {
pub c_str: [u8; S],
}
Fields
c_str: [u8; S]
Implementations
sourceimpl<const S: usize> CString<S>
impl<const S: usize> CString<S>
pub const fn new() -> Self
pub const fn from_raw(raw_bytes: [u8; S]) -> Self
pub const fn from_str(string: &str) -> Self
pub fn from_string(string: String) -> Self
pub fn len(&self) -> usize
pub const fn set_str(&mut self, string: &str)
pub fn set_string(&mut self, string: String)
pub fn get_str(&self) -> Result<&'static str>
pub fn get_string(&self) -> Result<String>
Trait Implementations
impl<const S: usize> Copy for CString<S>
impl<const S: usize> Eq for CString<S>
Auto Trait Implementations
impl<const S: usize> RefUnwindSafe for CString<S>
impl<const S: usize> Send for CString<S>
impl<const S: usize> Sync for CString<S>
impl<const S: usize> Unpin for CString<S>
impl<const S: usize> UnwindSafe for CString<S>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> RequestCommandParameter for T where
T: Copy,
impl<T> RequestCommandParameter for T where
T: Copy,
default fn before_request_write(
_raw: &T,
walker: &mut DataWalker,
_ctx: &mut CommandContext
) -> Result<(), ResultCode>
default fn before_send_sync_request(
raw: &T,
walker: &mut DataWalker,
_ctx: &mut CommandContext
) -> Result<(), ResultCode>
sourceimpl<T> RequestCommandParameter<T> for T where
T: Copy,
impl<T> RequestCommandParameter<T> for T where
T: Copy,
default fn after_request_read(
ctx: &mut ServerContext<'_>
) -> Result<T, ResultCode>
sourceimpl<T> ResponseCommandParameter for T where
T: Copy,
impl<T> ResponseCommandParameter for T where
T: Copy,
default fn before_response_write(
_raw: &T,
ctx: &mut ServerContext<'_>
) -> Result<(), ResultCode>
default fn after_response_write(
raw: &T,
ctx: &mut ServerContext<'_>
) -> Result<(), ResultCode>
sourceimpl<T> ResponseCommandParameter<T> for T where
T: Copy,
impl<T> ResponseCommandParameter<T> for T where
T: Copy,
default fn after_response_read(
walker: &mut DataWalker,
_ctx: &mut CommandContext
) -> Result<T, ResultCode>
impl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more