pub struct Request<'a> {
pub command: String,
pub meta: Vec<(String, BString)>,
/* private fields */
}
Expand description
A request to be handled by the server, typically done in a loop.
Fields§
§command: String
The command to execute with this request.
meta: Vec<(String, BString)>
A list of key-value pairs of meta-data related to command
.
Implementations§
source§impl Request<'_>
impl Request<'_>
sourcepub fn as_read(
&mut self,
) -> WithSidebands<'_, StdinLock<'static>, fn(_: bool, _: &[u8]) -> ProgressAction> ⓘ
pub fn as_read( &mut self, ) -> WithSidebands<'_, StdinLock<'static>, fn(_: bool, _: &[u8]) -> ProgressAction> ⓘ
Turn ourselves into a reader that can read until the next flush packet.
sourcepub fn write_status(&mut self, status: Status) -> Result<()>
pub fn write_status(&mut self, status: Status) -> Result<()>
Write the status
message followed by a flush packet.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Request<'a>
impl<'a> RefUnwindSafe for Request<'a>
impl<'a> !Send for Request<'a>
impl<'a> !Sync for Request<'a>
impl<'a> Unpin for Request<'a>
impl<'a> !UnwindSafe for Request<'a>
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