pub struct RejectListUrl(/* private fields */);Implementations§
Source§impl RejectListUrl
impl RejectListUrl
Source§impl RejectListUrl
impl RejectListUrl
pub fn from_strict_val_unchecked(value: &StrictVal) -> RejectListUrl
Methods from Deref<Target = AsciiString>§
Sourcepub fn capacity(&self) -> usize
pub fn capacity(&self) -> usize
Returns the number of bytes that this ASCII string buffer can hold without reallocating.
§Examples
let s = String::with_capacity(10);
assert!(s.capacity() >= 10);Methods from Deref<Target = AsciiStr>§
Sourcepub fn as_mut_slice(&mut self) -> &mut [AsciiChar]
pub fn as_mut_slice(&mut self) -> &mut [AsciiChar]
Returns the entire string as mutable slice of AsciiChars.
Sourcepub fn as_ptr(&self) -> *const AsciiChar
pub fn as_ptr(&self) -> *const AsciiChar
Returns a raw pointer to the AsciiStr’s buffer.
The caller must ensure that the slice outlives the pointer this function returns, or else it
will end up pointing to garbage. Modifying the AsciiStr may cause it’s buffer to be
reallocated, which would also make any pointers to it invalid.
Sourcepub fn as_mut_ptr(&mut self) -> *mut AsciiChar
pub fn as_mut_ptr(&mut self) -> *mut AsciiChar
Returns an unsafe mutable pointer to the AsciiStr’s buffer.
The caller must ensure that the slice outlives the pointer this function returns, or else it
will end up pointing to garbage. Modifying the AsciiStr may cause it’s buffer to be
reallocated, which would also make any pointers to it invalid.
Sourcepub fn to_ascii_string(&self) -> AsciiString
pub fn to_ascii_string(&self) -> AsciiString
Copies the content of this AsciiStr into an owned AsciiString.
Sourcepub fn len(&self) -> usize
pub fn len(&self) -> usize
Returns the number of characters / bytes in this ASCII sequence.
§Examples
let s = AsciiStr::from_ascii("foo").unwrap();
assert_eq!(s.len(), 3);Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true if the ASCII slice contains zero bytes.
§Examples
let mut empty = AsciiStr::from_ascii("").unwrap();
let mut full = AsciiStr::from_ascii("foo").unwrap();
assert!(empty.is_empty());
assert!(!full.is_empty());Sourcepub fn chars_mut(&mut self) -> CharsMut<'_> ⓘ
pub fn chars_mut(&mut self) -> CharsMut<'_> ⓘ
Returns an iterator over the characters of the AsciiStr which allows you to modify the
value of each AsciiChar.
Sourcepub fn split(&self, on: AsciiChar) -> impl DoubleEndedIterator
pub fn split(&self, on: AsciiChar) -> impl DoubleEndedIterator
Returns an iterator over parts of the AsciiStr separated by a character.
§Examples
let words = AsciiStr::from_ascii("apple banana lemon").unwrap()
.split(AsciiChar::Space)
.map(|a| a.as_str())
.collect::<Vec<_>>();
assert_eq!(words, ["apple", "banana", "lemon"]);Sourcepub fn lines(&self) -> impl DoubleEndedIterator
pub fn lines(&self) -> impl DoubleEndedIterator
Returns an iterator over the lines of the AsciiStr, which are themselves AsciiStrs.
Lines are ended with either LineFeed (\n), or CarriageReturn then LineFeed (\r\n).
The final line ending is optional.
Sourcepub fn trim(&self) -> &AsciiStr
pub fn trim(&self) -> &AsciiStr
Returns an ASCII string slice with leading and trailing whitespace removed.
§Examples
let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap();
assert_eq!("white \tspace", example.trim());Sourcepub fn trim_start(&self) -> &AsciiStr
pub fn trim_start(&self) -> &AsciiStr
Returns an ASCII string slice with leading whitespace removed.
§Examples
let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap();
assert_eq!("white \tspace \t", example.trim_start());Sourcepub fn trim_end(&self) -> &AsciiStr
pub fn trim_end(&self) -> &AsciiStr
Returns an ASCII string slice with trailing whitespace removed.
§Examples
let example = AsciiStr::from_ascii(" \twhite \tspace \t").unwrap();
assert_eq!(" \twhite \tspace", example.trim_end());Sourcepub fn eq_ignore_ascii_case(&self, other: &AsciiStr) -> bool
pub fn eq_ignore_ascii_case(&self, other: &AsciiStr) -> bool
Compares two strings case-insensitively.
Sourcepub fn make_ascii_uppercase(&mut self)
pub fn make_ascii_uppercase(&mut self)
Replaces lowercase letters with their uppercase equivalent.
Sourcepub fn make_ascii_lowercase(&mut self)
pub fn make_ascii_lowercase(&mut self)
Replaces uppercase letters with their lowercase equivalent.
Sourcepub fn to_ascii_uppercase(&self) -> AsciiString
pub fn to_ascii_uppercase(&self) -> AsciiString
Returns a copy of this string where letters ‘a’ to ‘z’ are mapped to ‘A’ to ‘Z’.
Sourcepub fn to_ascii_lowercase(&self) -> AsciiString
pub fn to_ascii_lowercase(&self) -> AsciiString
Returns a copy of this string where letters ‘A’ to ‘Z’ are mapped to ‘a’ to ‘z’.
Trait Implementations§
Source§impl AsRef<RString<AsciiPrintable, AsciiPrintable, 1, 8000>> for RejectListUrl
impl AsRef<RString<AsciiPrintable, AsciiPrintable, 1, 8000>> for RejectListUrl
Source§fn as_ref(&self) -> &RString<AsciiPrintable, AsciiPrintable, 1, 8000>
fn as_ref(&self) -> &RString<AsciiPrintable, AsciiPrintable, 1, 8000>
Source§impl AsRef<str> for RejectListUrl
impl AsRef<str> for RejectListUrl
Source§impl Borrow<RString<AsciiPrintable, AsciiPrintable, 1, 8000>> for RejectListUrl
impl Borrow<RString<AsciiPrintable, AsciiPrintable, 1, 8000>> for RejectListUrl
Source§fn borrow(&self) -> &RString<AsciiPrintable, AsciiPrintable, 1, 8000>
fn borrow(&self) -> &RString<AsciiPrintable, AsciiPrintable, 1, 8000>
Source§impl Borrow<str> for RejectListUrl
impl Borrow<str> for RejectListUrl
Source§impl Clone for RejectListUrl
impl Clone for RejectListUrl
Source§fn clone(&self) -> RejectListUrl
fn clone(&self) -> RejectListUrl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RejectListUrl
impl Debug for RejectListUrl
Source§impl Deref for RejectListUrl
impl Deref for RejectListUrl
Source§type Target = RString<AsciiPrintable, AsciiPrintable, 1, 8000>
type Target = RString<AsciiPrintable, AsciiPrintable, 1, 8000>
Source§impl<'de> Deserialize<'de> for RejectListUrl
impl<'de> Deserialize<'de> for RejectListUrl
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RejectListUrl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RejectListUrl, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for RejectListUrl
impl Display for RejectListUrl
Source§impl From<&'static str> for RejectListUrl
impl From<&'static str> for RejectListUrl
Source§fn from(ident: &'static str) -> RejectListUrl
fn from(ident: &'static str) -> RejectListUrl
Source§impl From<RString<AsciiPrintable, AsciiPrintable, 1, 8000>> for RejectListUrl
impl From<RString<AsciiPrintable, AsciiPrintable, 1, 8000>> for RejectListUrl
Source§fn from(v: RString<AsciiPrintable, AsciiPrintable, 1, 8000>) -> RejectListUrl
fn from(v: RString<AsciiPrintable, AsciiPrintable, 1, 8000>) -> RejectListUrl
Source§impl From<RejectListUrl> for Ident
impl From<RejectListUrl> for Ident
Source§fn from(name: RejectListUrl) -> Ident
fn from(name: RejectListUrl) -> Ident
Source§impl From<RejectListUrl> for RString<AsciiPrintable, AsciiPrintable, 1, 8000>
impl From<RejectListUrl> for RString<AsciiPrintable, AsciiPrintable, 1, 8000>
Source§fn from(
wrapped: RejectListUrl,
) -> RString<AsciiPrintable, AsciiPrintable, 1, 8000>
fn from( wrapped: RejectListUrl, ) -> RString<AsciiPrintable, AsciiPrintable, 1, 8000>
Source§impl From<RejectListUrl> for String
impl From<RejectListUrl> for String
Source§fn from(ident: RejectListUrl) -> String
fn from(ident: RejectListUrl) -> String
Source§impl FromStr for RejectListUrl
impl FromStr for RejectListUrl
Source§impl Hash for RejectListUrl
impl Hash for RejectListUrl
Source§impl PartialEq for RejectListUrl
impl PartialEq for RejectListUrl
Source§impl Serialize for RejectListUrl
impl Serialize for RejectListUrl
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl StrictDecode for RejectListUrl
impl StrictDecode for RejectListUrl
fn strict_decode( reader: &mut impl TypedRead, ) -> Result<RejectListUrl, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDeserialize for RejectListUrl
impl StrictDeserialize for RejectListUrl
fn from_strict_serialized<const MAX: usize>( ast_data: Confined<Vec<u8>, 0, MAX>, ) -> Result<Self, DeserializeError>
fn strict_deserialize_from_file<const MAX: usize>( path: impl AsRef<Path>, ) -> Result<Self, DeserializeError>
Source§impl StrictDumb for RejectListUrl
impl StrictDumb for RejectListUrl
fn strict_dumb() -> RejectListUrl
Source§impl StrictEncode for RejectListUrl
impl StrictEncode for RejectListUrl
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictSerialize for RejectListUrl
impl StrictSerialize for RejectListUrl
fn strict_serialized_len<const MAX: usize>(&self) -> Result<usize, Error>
fn to_strict_serialized<const MAX: usize>( &self, ) -> Result<Confined<Vec<u8>, 0, MAX>, SerializeError>
fn strict_serialize_to_file<const MAX: usize>( &self, path: impl AsRef<Path>, ) -> Result<(), SerializeError>
Source§impl StrictTuple for RejectListUrl
impl StrictTuple for RejectListUrl
const FIELD_COUNT: u8 = 1u8
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for RejectListUrl
impl StrictType for RejectListUrl
const STRICT_LIB_NAME: &'static str = LIB_NAME_RGB_CONTRACT
fn strict_name() -> Option<TypeName>
Source§impl TryFrom<String> for RejectListUrl
impl TryFrom<String> for RejectListUrl
Source§type Error = InvalidRString
type Error = InvalidRString
Source§fn try_from(
s: String,
) -> Result<RejectListUrl, <RejectListUrl as TryFrom<String>>::Error>
fn try_from( s: String, ) -> Result<RejectListUrl, <RejectListUrl as TryFrom<String>>::Error>
Source§impl Wrapper for RejectListUrl
impl Wrapper for RejectListUrl
Source§type Inner = RString<AsciiPrintable, AsciiPrintable, 1, 8000>
type Inner = RString<AsciiPrintable, AsciiPrintable, 1, 8000>
Source§fn from_inner(inner: <RejectListUrl as Wrapper>::Inner) -> RejectListUrl
fn from_inner(inner: <RejectListUrl as Wrapper>::Inner) -> RejectListUrl
Source§fn as_inner(&self) -> &<RejectListUrl as Wrapper>::Inner
fn as_inner(&self) -> &<RejectListUrl as Wrapper>::Inner
Source§fn into_inner(self) -> <RejectListUrl as Wrapper>::Inner
fn into_inner(self) -> <RejectListUrl as Wrapper>::Inner
impl Eq for RejectListUrl
impl StrictProduct for RejectListUrl
impl StructuralPartialEq for RejectListUrl
Auto Trait Implementations§
impl Freeze for RejectListUrl
impl RefUnwindSafe for RejectListUrl
impl Send for RejectListUrl
impl Sync for RejectListUrl
impl Unpin for RejectListUrl
impl UnwindSafe for RejectListUrl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.