Struct segment_rs::command::Command
source · [−]pub struct Command { /* private fields */ }
Expand description
Specifies a Segment command
Implementations
sourceimpl Command
impl Command
sourcepub fn arg<T: ToSegmentFrame>(&mut self, arg: T) -> &mut Self
pub fn arg<T: ToSegmentFrame>(&mut self, arg: T) -> &mut Self
Pushes an arg to command’s arg vec
sourcepub async fn query<T: FromSegmentFrame>(
self,
connection: &mut Connection
) -> Result<T, CommandError>
pub async fn query<T: FromSegmentFrame>(
self,
connection: &mut Connection
) -> Result<T, CommandError>
Constructs a command from the args, executes it and returns the result
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more