Expand description
A reference to a collection that has a unique name view.
Variants
Name(Cow<'a, str>)
An entity’s name.
Id(u64)
A document id.
Implementations
Converts this reference to an owned reference with a 'static
lifetime.
pub async fn id<Col, Cn>(
&'_ self,
connection: &'_ Cn
) -> Result<Option<u64>, Error> where
Col: NamedCollection,
Cn: Connection,
pub async fn id<Col, Cn>(
&'_ self,
connection: &'_ Cn
) -> Result<Option<u64>, Error> where
Col: NamedCollection,
Cn: Connection,
Returns this reference’s id. If the reference is a name, the
NamedCollection::ByNameView
is queried for the id.
Trait Implementations
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<NamedReference<'a>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
pub fn deserialize<__D>(
__deserializer: __D
) -> Result<NamedReference<'a>, <__D as Deserializer<'de>>::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Performs the conversion.
Performs the conversion.
Performs the conversion.
impl<'a, 'c, C> From<&'c CollectionDocument<C>> for NamedReference<'a> where
C: SerializedCollection,
impl<'a, 'c, C> From<&'c CollectionDocument<C>> for NamedReference<'a> where
C: SerializedCollection,
Performs the conversion.
Performs the conversion.
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
pub fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error> where
__S: Serializer,
pub 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<'a> RefUnwindSafe for NamedReference<'a>
impl<'a> Send for NamedReference<'a>
impl<'a> Sync for NamedReference<'a>
impl<'a> Unpin for NamedReference<'a>
impl<'a> UnwindSafe for NamedReference<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more