pub struct SubnetRole(pub Cow<'static, str>);Tuple Fields§
§0: Cow<'static, str>Implementations§
Source§impl SubnetRole
impl SubnetRole
pub const PRIME: Self
pub const fn new(s: &'static str) -> Self
pub const fn owned(s: String) -> Self
pub fn as_str(&self) -> &str
Sourcepub fn is_prime(&self) -> bool
pub fn is_prime(&self) -> bool
Returns true if this type represents the built-in ROOT canister.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Convert into an owned string (avoids an extra allocation for owned variants).
Trait Implementations§
Source§impl AsRef<str> for SubnetRole
impl AsRef<str> for SubnetRole
Source§impl Borrow<str> for SubnetRole
impl Borrow<str> for SubnetRole
Source§impl CandidType for SubnetRole
impl CandidType for SubnetRole
Source§impl Clone for SubnetRole
impl Clone for SubnetRole
Source§fn clone(&self) -> SubnetRole
fn clone(&self) -> SubnetRole
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubnetRole
impl Debug for SubnetRole
Source§impl<'de> Deserialize<'de> for SubnetRole
impl<'de> Deserialize<'de> for SubnetRole
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SubnetRole
impl Display for SubnetRole
Source§impl From<&String> for SubnetRole
impl From<&String> for SubnetRole
Source§impl From<&'static str> for SubnetRole
impl From<&'static str> for SubnetRole
Source§impl From<String> for SubnetRole
impl From<String> for SubnetRole
Source§impl From<SubnetRole> for String
impl From<SubnetRole> for String
Source§fn from(ct: SubnetRole) -> Self
fn from(ct: SubnetRole) -> Self
Converts to this type from the input type.
Source§impl FromStr for SubnetRole
impl FromStr for SubnetRole
Source§impl Hash for SubnetRole
impl Hash for SubnetRole
Source§impl Ord for SubnetRole
impl Ord for SubnetRole
Source§impl PartialEq for SubnetRole
impl PartialEq for SubnetRole
Source§impl PartialOrd for SubnetRole
impl PartialOrd for SubnetRole
Source§impl Serialize for SubnetRole
impl Serialize for SubnetRole
Source§impl Storable for SubnetRole
impl Storable for SubnetRole
Source§fn to_bytes(&self) -> Cow<'_, [u8]>
fn to_bytes(&self) -> Cow<'_, [u8]>
Converts the element into a possibly borrowed byte slice. Read more
Source§fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
Converts bytes into an element.
Source§fn to_bytes_checked(&self) -> Cow<'_, [u8]>
fn to_bytes_checked(&self) -> Cow<'_, [u8]>
Like
to_bytes, but checks that bytes conform to declared bounds.Source§fn into_bytes_checked(self) -> Vec<u8> ⓘwhere
Self: Sized,
fn into_bytes_checked(self) -> Vec<u8> ⓘwhere
Self: Sized,
Like
into_bytes, but checks that bytes conform to declared bounds.Source§fn check_bounds(bytes: &[u8])
fn check_bounds(bytes: &[u8])
Validates that a byte slice fits within this type’s declared bounds.
impl Eq for SubnetRole
impl StructuralPartialEq for SubnetRole
Auto Trait Implementations§
impl Freeze for SubnetRole
impl RefUnwindSafe for SubnetRole
impl Send for SubnetRole
impl Sync for SubnetRole
impl Unpin for SubnetRole
impl UnwindSafe for SubnetRole
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§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> Casing<T> for T
impl<T> Casing<T> for T
Source§fn to_case(&self, case: Case<'_>) -> String
fn to_case(&self, case: Case<'_>) -> String
Convert the string into the given case. It will reference
self and create a new
String with the same pattern and delimeter as case. It will split on boundaries
defined at Boundary::defaults(). Read moreSource§fn set_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
fn set_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
Creates a
StateConverter struct initialized with the boundaries provided. Read moreSource§fn remove_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
fn remove_boundaries(&self, bs: &[Boundary]) -> StateConverter<'_, T>
Creates a
StateConverter struct initialized without the boundaries
provided. Read more§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)