pub struct TypedDomainRecordRef<T>where
T: DomainRecordType,{ /* private fields */ }Expand description
Typed façade over a stable application-defined record identity.
Its serialized representation is exactly the wrapped DomainRecordRef;
the marker exists only at compile time.
Implementations§
Source§impl<T> TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> TypedDomainRecordRef<T>where
T: DomainRecordType,
pub fn new(id: impl Into<String>) -> TypedDomainRecordRef<T>
pub const fn as_untyped(&self) -> &DomainRecordRef
pub fn into_untyped(self) -> DomainRecordRef
Sourcepub fn from_untyped(
reference: DomainRecordRef,
) -> Result<TypedDomainRecordRef<T>, DomainRecordRef>
pub fn from_untyped( reference: DomainRecordRef, ) -> Result<TypedDomainRecordRef<T>, DomainRecordRef>
Converts an untyped reference when its namespaced kind matches T.
§Errors
Returns the original reference when it belongs to another kind.
pub fn id(&self) -> &str
Trait Implementations§
Source§impl<T> Clone for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Clone for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§fn clone(&self) -> TypedDomainRecordRef<T>
fn clone(&self) -> TypedDomainRecordRef<T>
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<T> Debug for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Debug for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§impl<'de, T> Deserialize<'de> for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<'de, T> Deserialize<'de> for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§fn deserialize<D>(
deserializer: D,
) -> Result<TypedDomainRecordRef<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<TypedDomainRecordRef<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T> Display for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Display for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Eq for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§impl<T> From<TypedDomainRecordRef<T>> for DomainRecordRefwhere
T: DomainRecordType,
impl<T> From<TypedDomainRecordRef<T>> for DomainRecordRefwhere
T: DomainRecordType,
Source§fn from(reference: TypedDomainRecordRef<T>) -> DomainRecordRef
fn from(reference: TypedDomainRecordRef<T>) -> DomainRecordRef
Converts to this type from the input type.
Source§impl<T> From<TypedDomainRecordRef<T>> for EntityRefwhere
T: DomainEntityType,
impl<T> From<TypedDomainRecordRef<T>> for EntityRefwhere
T: DomainEntityType,
Source§fn from(reference: TypedDomainRecordRef<T>) -> EntityRef
fn from(reference: TypedDomainRecordRef<T>) -> EntityRef
Converts to this type from the input type.
Source§impl<T> Hash for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Hash for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§impl<T> Ord for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Ord for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§fn cmp(&self, other: &TypedDomainRecordRef<T>) -> Ordering
fn cmp(&self, other: &TypedDomainRecordRef<T>) -> 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<T> PartialEq for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> PartialEq for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§impl<T> PartialOrd for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> PartialOrd for TypedDomainRecordRef<T>where
T: DomainRecordType,
Source§impl<T> Serialize for TypedDomainRecordRef<T>where
T: DomainRecordType,
impl<T> Serialize for TypedDomainRecordRef<T>where
T: DomainRecordType,
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
Auto Trait Implementations§
impl<T> Freeze for TypedDomainRecordRef<T>
impl<T> RefUnwindSafe for TypedDomainRecordRef<T>
impl<T> Send for TypedDomainRecordRef<T>
impl<T> Sync for TypedDomainRecordRef<T>
impl<T> Unpin for TypedDomainRecordRef<T>
impl<T> UnsafeUnpin for TypedDomainRecordRef<T>
impl<T> UnwindSafe for TypedDomainRecordRef<T>
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