pub struct AotTargetId(/* private fields */);Expand description
Stable validated AOT target identity. Validated target identity carried by target-owned facet registrations.
Linked target owners construct borrowed identities at declaration time. Deserialized manifests retain owned identities without leaking storage.
Implementations§
Source§impl TargetId
impl TargetId
Sourcepub const fn new(id: &'static str) -> Result<TargetId, &'static str>
pub const fn new(id: &'static str) -> Result<TargetId, &'static str>
Construct a borrowed target identity from an owner-defined stable spelling.
§Errors
Empty or whitespace-padded identities are rejected.
Sourcepub fn from_owned(id: String) -> Result<TargetId, &'static str>
pub fn from_owned(id: String) -> Result<TargetId, &'static str>
Construct an owned target identity from persisted or caller-supplied data.
§Errors
Empty or whitespace-padded identities are rejected.
Sourcepub const fn expect_valid(id: &'static str) -> TargetId
pub const fn expect_valid(id: &'static str) -> TargetId
Construct a validated borrowed target identity for a compile-time constant.
§Panics
Panics when the identity is empty or has surrounding whitespace.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TargetId
impl<'de> Deserialize<'de> for TargetId
Source§fn deserialize<D>(
deserializer: D,
) -> Result<TargetId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TargetId, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TargetId
Source§impl Ord for TargetId
impl Ord for TargetId
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 PartialOrd for TargetId
impl PartialOrd for TargetId
Source§impl Serialize for TargetId
impl Serialize for TargetId
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,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for TargetId
Auto Trait Implementations§
impl Freeze for TargetId
impl RefUnwindSafe for TargetId
impl Send for TargetId
impl Sync for TargetId
impl Unpin for TargetId
impl UnsafeUnpin for TargetId
impl UnwindSafe for TargetId
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.