pub struct SubnetSlotId(pub Cow<'static, str>);Tuple Fields§
§0: Cow<'static, str>Implementations§
Source§impl SubnetSlotId
impl SubnetSlotId
pub const DEFAULT: Self
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Return whether this is the built-in default workload slot.
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 SubnetSlotId
impl AsRef<str> for SubnetSlotId
Source§impl Borrow<str> for SubnetSlotId
impl Borrow<str> for SubnetSlotId
Source§impl CandidType for SubnetSlotId
impl CandidType for SubnetSlotId
Source§impl Clone for SubnetSlotId
impl Clone for SubnetSlotId
Source§fn clone(&self) -> SubnetSlotId
fn clone(&self) -> SubnetSlotId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SubnetSlotId
impl Debug for SubnetSlotId
Source§impl<'de> Deserialize<'de> for SubnetSlotId
impl<'de> Deserialize<'de> for SubnetSlotId
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 SubnetSlotId
impl Display for SubnetSlotId
impl Eq for SubnetSlotId
Source§impl From<&'static str> for SubnetSlotId
impl From<&'static str> for SubnetSlotId
Source§impl From<&String> for SubnetSlotId
impl From<&String> for SubnetSlotId
Source§impl From<String> for SubnetSlotId
impl From<String> for SubnetSlotId
Source§impl From<SubnetSlotId> for String
impl From<SubnetSlotId> for String
Source§fn from(ct: SubnetSlotId) -> Self
fn from(ct: SubnetSlotId) -> Self
Converts to this type from the input type.
Source§impl FromStr for SubnetSlotId
impl FromStr for SubnetSlotId
Source§impl Hash for SubnetSlotId
impl Hash for SubnetSlotId
Source§impl Ord for SubnetSlotId
impl Ord for SubnetSlotId
Source§fn cmp(&self, other: &SubnetSlotId) -> Ordering
fn cmp(&self, other: &SubnetSlotId) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for SubnetSlotId
impl PartialEq for SubnetSlotId
Source§impl PartialOrd for SubnetSlotId
impl PartialOrd for SubnetSlotId
Source§impl Serialize for SubnetSlotId
impl Serialize for SubnetSlotId
Source§impl Storable for SubnetSlotId
impl Storable for SubnetSlotId
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 StructuralPartialEq for SubnetSlotId
Auto Trait Implementations§
impl Freeze for SubnetSlotId
impl RefUnwindSafe for SubnetSlotId
impl Send for SubnetSlotId
impl Sync for SubnetSlotId
impl Unpin for SubnetSlotId
impl UnsafeUnpin for SubnetSlotId
impl UnwindSafe for SubnetSlotId
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