pub struct DataProjection(pub Map<String, Value>);Expand description
Mongo data query projection
Tuple Fields§
§0: Map<String, Value>Methods from Deref<Target = Map<String, Value>>§
Sourcepub fn get<Q>(&self, key: &Q) -> Option<&Value>
pub fn get<Q>(&self, key: &Q) -> Option<&Value>
Returns a reference to the value corresponding to the key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Sourcepub fn contains_key<Q>(&self, key: &Q) -> bool
pub fn contains_key<Q>(&self, key: &Q) -> bool
Returns true if the map contains a value for the specified key.
The key may be any borrowed form of the map’s key type, but the ordering on the borrowed form must match the ordering on the key type.
Trait Implementations§
Source§impl Clone for DataProjection
impl Clone for DataProjection
Source§impl Debug for DataProjection
impl Debug for DataProjection
Source§impl Deref for DataProjection
impl Deref for DataProjection
Source§impl<'de> Deserialize<'de> for DataProjection
impl<'de> Deserialize<'de> for DataProjection
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 From<&DataProjection> for DataProjection
impl From<&DataProjection> for DataProjection
Source§fn from(value: &DataProjection) -> Self
fn from(value: &DataProjection) -> Self
Converts to this type from the input type.
Source§impl From<DataProjection> for Map<String, Value>
impl From<DataProjection> for Map<String, Value>
Source§fn from(value: DataProjection) -> Self
fn from(value: DataProjection) -> Self
Converts to this type from the input type.
Source§impl Into<DataProjection> for DataProjection
impl Into<DataProjection> for DataProjection
Source§fn into(self) -> DataProjection
fn into(self) -> DataProjection
Converts this type into the (usually inferred) input type.
Source§impl Into<DataProjection> for Value
impl Into<DataProjection> for Value
Source§fn into(self) -> DataProjection
fn into(self) -> DataProjection
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for DataProjection
impl RefUnwindSafe for DataProjection
impl Send for DataProjection
impl Sync for DataProjection
impl Unpin for DataProjection
impl UnsafeUnpin for DataProjection
impl UnwindSafe for DataProjection
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