Constant strings.
Find a file
2025-05-06 12:26:05 +02:00
src Update docs; Update signatures for 'String::{from_utf8, from_utf8_unchecked}'; Add 'FromUtf8Error' error type; Implement 'From<FromUtf8Error>' for 'oct::error::GenericDecodeError'; Add 'zerocopy' and 'bytemuck' features; Implement 'zerocopy::{FromZeros, KnownLayout, Immutable}' for 'String'; Implement 'bytemuck::{NoUninit, Zeroable}' for 'String'; Add 'ceil_char_boundary' and 'floor_char_boundary' methods to 'String'; Update tests; Add 'repeat' method to 'String'; Add 'resize' method to 'String'; Fix 'String::truncate' panicking on attempted extensions; Update readme; Clean up code; 2025-05-06 12:26:05 +02:00
.gitignore Add Cargo manifest; Add changelog; Add 'String' type; Add 'alloc' and 'std' features; Add 'string' macro; Add 'error' module; Dual-license under MIT or Apache 2.0; Configure lints; Add gitignore; Add 'LengthError' and 'Utf8Error' errors; Add tests; Add 'new' and 'from_utf8' constructors to 'String'; Add 'new_unchecked', 'from_utf8_unchecked', and 'from_raw_parts' constructors to 'String'; Add 'len' and 'is_empty' methods to 'String'; Add 'as_ptr', 'as_mut_ptr', 'as_bytes', 'as_bytes_mut', 'as_str' and 'as_mut_str' methods to 'String'; Add 'into_std_string', 'into_boxed_str', and 'into_raw_parts' destructors to 'String'; Implement 'AsRef<str>', 'AsMut<str>', 'AsRef<[u8]>', 'AsRef<OsStr>', and 'AsRef<Path>' for 'String'; Implement 'Borrow<str>' and 'BorrowMut<str>' for 'String'; Implement 'Deref' and 'DerefMut' for 'String'; Implement 'PartialOrd', 'Eq', and 'Ord' for 'String'; Implement 'FromStr' for 'String'; Implement 'ToSocketAddrs' for 'String'; Implement 'TryFrom<char>', 'TryFrom<&str>', and 'TryFrom<alloc::string::String>' for 'String'; Implement 'PartialEq<Self>', 'PartialEq<str>', 'PartialEq<&str>', 'PartialEq<Cow>', and 'PartialEq<alloc::string::String>' for 'String'; Implement 'Default' for 'String'; Implement 'Debug' and 'Display' for 'String'; Implement 'FromIterator<char>' for 'String'; Implement 'Hash' for 'String'; Implement 'Index' and 'IndexMut' for 'String'; Implement 'From<String>' for 'alloc::string::String' and 'Box<str>'; Implement 'PartialEq<String>' for 'alloc::string::String'; Add 'is_char_boundary' method to 'String'; Implement 'Clone' and 'Copy' for 'String'; 2025-04-04 17:31:50 +02:00
Cargo.toml Update docs; Update signatures for 'String::{from_utf8, from_utf8_unchecked}'; Add 'FromUtf8Error' error type; Implement 'From<FromUtf8Error>' for 'oct::error::GenericDecodeError'; Add 'zerocopy' and 'bytemuck' features; Implement 'zerocopy::{FromZeros, KnownLayout, Immutable}' for 'String'; Implement 'bytemuck::{NoUninit, Zeroable}' for 'String'; Add 'ceil_char_boundary' and 'floor_char_boundary' methods to 'String'; Update tests; Add 'repeat' method to 'String'; Add 'resize' method to 'String'; Fix 'String::truncate' panicking on attempted extensions; Update readme; Clean up code; 2025-05-06 12:26:05 +02:00
CHANGELOG.md Update docs; Update signatures for 'String::{from_utf8, from_utf8_unchecked}'; Add 'FromUtf8Error' error type; Implement 'From<FromUtf8Error>' for 'oct::error::GenericDecodeError'; Add 'zerocopy' and 'bytemuck' features; Implement 'zerocopy::{FromZeros, KnownLayout, Immutable}' for 'String'; Implement 'bytemuck::{NoUninit, Zeroable}' for 'String'; Add 'ceil_char_boundary' and 'floor_char_boundary' methods to 'String'; Update tests; Add 'repeat' method to 'String'; Add 'resize' method to 'String'; Fix 'String::truncate' panicking on attempted extensions; Update readme; Clean up code; 2025-05-06 12:26:05 +02:00
clippy.toml Add Cargo manifest; Add changelog; Add 'String' type; Add 'alloc' and 'std' features; Add 'string' macro; Add 'error' module; Dual-license under MIT or Apache 2.0; Configure lints; Add gitignore; Add 'LengthError' and 'Utf8Error' errors; Add tests; Add 'new' and 'from_utf8' constructors to 'String'; Add 'new_unchecked', 'from_utf8_unchecked', and 'from_raw_parts' constructors to 'String'; Add 'len' and 'is_empty' methods to 'String'; Add 'as_ptr', 'as_mut_ptr', 'as_bytes', 'as_bytes_mut', 'as_str' and 'as_mut_str' methods to 'String'; Add 'into_std_string', 'into_boxed_str', and 'into_raw_parts' destructors to 'String'; Implement 'AsRef<str>', 'AsMut<str>', 'AsRef<[u8]>', 'AsRef<OsStr>', and 'AsRef<Path>' for 'String'; Implement 'Borrow<str>' and 'BorrowMut<str>' for 'String'; Implement 'Deref' and 'DerefMut' for 'String'; Implement 'PartialOrd', 'Eq', and 'Ord' for 'String'; Implement 'FromStr' for 'String'; Implement 'ToSocketAddrs' for 'String'; Implement 'TryFrom<char>', 'TryFrom<&str>', and 'TryFrom<alloc::string::String>' for 'String'; Implement 'PartialEq<Self>', 'PartialEq<str>', 'PartialEq<&str>', 'PartialEq<Cow>', and 'PartialEq<alloc::string::String>' for 'String'; Implement 'Default' for 'String'; Implement 'Debug' and 'Display' for 'String'; Implement 'FromIterator<char>' for 'String'; Implement 'Hash' for 'String'; Implement 'Index' and 'IndexMut' for 'String'; Implement 'From<String>' for 'alloc::string::String' and 'Box<str>'; Implement 'PartialEq<String>' for 'alloc::string::String'; Add 'is_char_boundary' method to 'String'; Implement 'Clone' and 'Copy' for 'String'; 2025-04-04 17:31:50 +02:00
LICENCE-APACHE Add Cargo manifest; Add changelog; Add 'String' type; Add 'alloc' and 'std' features; Add 'string' macro; Add 'error' module; Dual-license under MIT or Apache 2.0; Configure lints; Add gitignore; Add 'LengthError' and 'Utf8Error' errors; Add tests; Add 'new' and 'from_utf8' constructors to 'String'; Add 'new_unchecked', 'from_utf8_unchecked', and 'from_raw_parts' constructors to 'String'; Add 'len' and 'is_empty' methods to 'String'; Add 'as_ptr', 'as_mut_ptr', 'as_bytes', 'as_bytes_mut', 'as_str' and 'as_mut_str' methods to 'String'; Add 'into_std_string', 'into_boxed_str', and 'into_raw_parts' destructors to 'String'; Implement 'AsRef<str>', 'AsMut<str>', 'AsRef<[u8]>', 'AsRef<OsStr>', and 'AsRef<Path>' for 'String'; Implement 'Borrow<str>' and 'BorrowMut<str>' for 'String'; Implement 'Deref' and 'DerefMut' for 'String'; Implement 'PartialOrd', 'Eq', and 'Ord' for 'String'; Implement 'FromStr' for 'String'; Implement 'ToSocketAddrs' for 'String'; Implement 'TryFrom<char>', 'TryFrom<&str>', and 'TryFrom<alloc::string::String>' for 'String'; Implement 'PartialEq<Self>', 'PartialEq<str>', 'PartialEq<&str>', 'PartialEq<Cow>', and 'PartialEq<alloc::string::String>' for 'String'; Implement 'Default' for 'String'; Implement 'Debug' and 'Display' for 'String'; Implement 'FromIterator<char>' for 'String'; Implement 'Hash' for 'String'; Implement 'Index' and 'IndexMut' for 'String'; Implement 'From<String>' for 'alloc::string::String' and 'Box<str>'; Implement 'PartialEq<String>' for 'alloc::string::String'; Add 'is_char_boundary' method to 'String'; Implement 'Clone' and 'Copy' for 'String'; 2025-04-04 17:31:50 +02:00
LICENCE-MIT Add Cargo manifest; Add changelog; Add 'String' type; Add 'alloc' and 'std' features; Add 'string' macro; Add 'error' module; Dual-license under MIT or Apache 2.0; Configure lints; Add gitignore; Add 'LengthError' and 'Utf8Error' errors; Add tests; Add 'new' and 'from_utf8' constructors to 'String'; Add 'new_unchecked', 'from_utf8_unchecked', and 'from_raw_parts' constructors to 'String'; Add 'len' and 'is_empty' methods to 'String'; Add 'as_ptr', 'as_mut_ptr', 'as_bytes', 'as_bytes_mut', 'as_str' and 'as_mut_str' methods to 'String'; Add 'into_std_string', 'into_boxed_str', and 'into_raw_parts' destructors to 'String'; Implement 'AsRef<str>', 'AsMut<str>', 'AsRef<[u8]>', 'AsRef<OsStr>', and 'AsRef<Path>' for 'String'; Implement 'Borrow<str>' and 'BorrowMut<str>' for 'String'; Implement 'Deref' and 'DerefMut' for 'String'; Implement 'PartialOrd', 'Eq', and 'Ord' for 'String'; Implement 'FromStr' for 'String'; Implement 'ToSocketAddrs' for 'String'; Implement 'TryFrom<char>', 'TryFrom<&str>', and 'TryFrom<alloc::string::String>' for 'String'; Implement 'PartialEq<Self>', 'PartialEq<str>', 'PartialEq<&str>', 'PartialEq<Cow>', and 'PartialEq<alloc::string::String>' for 'String'; Implement 'Default' for 'String'; Implement 'Debug' and 'Display' for 'String'; Implement 'FromIterator<char>' for 'String'; Implement 'Hash' for 'String'; Implement 'Index' and 'IndexMut' for 'String'; Implement 'From<String>' for 'alloc::string::String' and 'Box<str>'; Implement 'PartialEq<String>' for 'alloc::string::String'; Add 'is_char_boundary' method to 'String'; Implement 'Clone' and 'Copy' for 'String'; 2025-04-04 17:31:50 +02:00
README.md Update docs; Update signatures for 'String::{from_utf8, from_utf8_unchecked}'; Add 'FromUtf8Error' error type; Implement 'From<FromUtf8Error>' for 'oct::error::GenericDecodeError'; Add 'zerocopy' and 'bytemuck' features; Implement 'zerocopy::{FromZeros, KnownLayout, Immutable}' for 'String'; Implement 'bytemuck::{NoUninit, Zeroable}' for 'String'; Add 'ceil_char_boundary' and 'floor_char_boundary' methods to 'String'; Update tests; Add 'repeat' method to 'String'; Add 'resize' method to 'String'; Fix 'String::truncate' panicking on attempted extensions; Update readme; Clean up code; 2025-05-06 12:26:05 +02:00

conststr

conststr is a Rust crate for const-compatible, owning strings.

Feature flags

The following features are enabled by default:

  • alloc: Enables implementations for alloc facilities
  • std: Enables implementations for std facilities

The following features may additionally be enabled:

  • bytemuck: Enables implementations for bytemuck traits
  • oct: Enables implementations for Oct facilities
  • serde: Enables implementations for Serde facilities
  • zerocopy: Enables implementations for Zerocopy traits

Copyright © 2025 Gabriel Bjørnager Jensen.

conststr is distributed under either an MIT licence (see LICENCE-MIT) or version 2.0 of the Apache License (see LICENCE-APACHE), at your option.