[−][src]Struct codd::expression::Singleton
Represents a single tuple of type T
.
Example:
use codd::{Database, expression::Singleton}; let mut db = Database::new(); let hello = Singleton::new("Hello".to_string()); assert_eq!(vec!["Hello".to_string()], db.evaluate(&hello).unwrap().into_tuples());
Implementations
impl<T: Tuple> Singleton<T>
[src]
pub fn new(tuple: T) -> Self
[src]
Create a new instance of Singleton
with tuple
as the inner value.
pub fn tuple(&self) -> &T
[src]
Returns a reference to the inner value of the receiver.
pub fn into_tuple(self) -> T
[src]
Consumes the receiver and returns its inner value.
Trait Implementations
impl<T: Clone> Clone for Singleton<T> where
T: Tuple,
[src]
T: Tuple,
impl<T: Debug> Debug for Singleton<T> where
T: Tuple,
[src]
T: Tuple,
impl<T> Expression<T> for Singleton<T> where
T: Tuple,
[src]
T: Tuple,
fn visit<V>(&self, visitor: &mut V) where
V: Visitor,
[src]
V: Visitor,
fn builder(&self) -> Builder<T, Self>
[src]
impl<T: Tuple> From<Singleton<T>> for Mono<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for Singleton<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> Send for Singleton<T> where
T: Send,
T: Send,
impl<T> Sync for Singleton<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Singleton<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Singleton<T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, E> IntoExpression<T, E> for E where
E: Expression<T>,
T: Tuple,
[src]
E: Expression<T>,
T: Tuple,
pub fn into_expression(Self) -> E
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,