pub const fn new(s: &str) -> Self {
        assert!(N == s.len());
        let mut payload = [0u8; N];
        unsafe {
            copy_nonoverlapping(s.as_ptr(), payload.as_mut_ptr(), N)
        };
        Self {
            vtable: VALUE_STR_A_VALUE_PTR,
            object: unsafe { StarlarkStr::new(N) },
            payload,
        }
    }
/// Create a new [`ConstFrozenStringN`] given a string of size `N`.
/// If the string has a different size it will fail.
Create a new [`ConstFrozenStringN`] given a string of size `N`.
If the string has a different size it will fail.
Create a new [ ` ConstFrozenStringN ` ] given a string of size ` N ` . If the string has a different size it will fail .
pub const fn new(s: &str) -> Self {
        assert!(N == s.len());
        let mut payload = [0u8; N];
        unsafe {
            copy_nonoverlapping(s.as_ptr(), payload.as_mut_ptr(), N)
        };
        Self {
            vtable: VALUE_STR_A_VALUE_PTR,
            object: unsafe { StarlarkStr::new(N) },
            payload,
        }
    }
pub const fn new ( s : & str ) -> Self { assert ! ( N s len ( ) ) ; let mut payload = [ 0u8 ; N ] ; unsafe { copy_nonoverlapping ( s . as_ptr ( ) , payload . as_mut_ptr ( ) , N ) } ; Self { vtable : VALUE_STR_A_VALUE_PTR , object : unsafe { StarlarkStr :: new ( N ) } , payload , } }
Create a new [`ConstFrozenStringN`] given a string of size `N`.
Create a new [ ` ConstFrozenStringN ` ] given a string of size ` N ` .
s
&str
s
&str