pub struct Scope(/* private fields */);Implementations§
Source§impl Scope
impl Scope
pub const MAX_CHAR_LENGTH: usize = 512usize
Sourcepub fn new<T: AsRef<str> + Into<CompactString>>(
scope: T,
) -> Result<Self, ScopeError>
pub fn new<T: AsRef<str> + Into<CompactString>>( scope: T, ) -> Result<Self, ScopeError>
Creates a new Scope from any type that implements AsRef<str> and Into<CompactString>.
§Errors
Returns an Err if the scope is empty or more than 512 characters long.
Sourcepub unsafe fn new_unchecked<T: Into<CompactString>>(scope: T) -> Self
pub unsafe fn new_unchecked<T: Into<CompactString>>(scope: T) -> Self
Creates a new Scope from any type that implements Into<CompactString> without checking
its validity.
§Safety
The scope must not be empty or more than 512 characters long.
Trait Implementations§
Source§impl Ord for Scope
impl Ord for Scope
Source§impl PartialOrd for Scope
impl PartialOrd for Scope
impl Eq for Scope
impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnwindSafe for Scope
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more