[][src]Enum mongodb_base_service::ID

pub enum ID {
    ObjectId(ObjectId),
    String(String),
    I64(i64),
}

An ID as defined by the GraphQL specification

Represented as a string, but can be converted to from an integer as well.

Variants

ObjectId(ObjectId)
String(String)
I64(i64)

Implementations

impl ID[src]

pub fn from_string<S: Into<String>>(value: S) -> Self[src]

pub fn with_string<S: Into<String>>(value: S) -> Self[src]

Construct a new ID from anything implementing Into<String>

pub fn with_i64<I: Into<i64>>(value: I) -> Self[src]

pub fn with_oid(value: ObjectId) -> Self[src]

pub fn with_bson(value: &Bson) -> Self[src]

pub fn to_bson(&self) -> Bson[src]

pub fn to_string(&self) -> String[src]

Trait Implementations

impl Clone for ID[src]

impl Debug for ID[src]

impl<'de> Deserialize<'de> for ID[src]

impl Display for ID[src]

impl Eq for ID[src]

impl From<ID> for String[src]

impl From<ID> for ObjectId[src]

impl From<ObjectId> for ID[src]

impl From<String> for ID[src]

impl From<i64> for ID[src]

impl Hash for ID[src]

impl PartialEq<ID> for ID[src]

impl Serialize for ID[src]

impl StructuralEq for ID[src]

impl StructuralPartialEq for ID[src]

Auto Trait Implementations

impl RefUnwindSafe for ID

impl Send for ID

impl Sync for ID

impl Unpin for ID

impl UnwindSafe for ID

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,