mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
rename method, update comments
This commit is contained in:
parent
8f910672e2
commit
6330bbfd85
2 changed files with 6 additions and 4 deletions
|
|
@ -113,8 +113,8 @@ impl Client {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Middle-level method to make new request to `Connection`
|
/// Middle-level helper, makes new request to available `Connection`
|
||||||
/// * callback with new `Response`on success or `Error` on failure
|
/// * callback with new `Response` on success or `Error` on failure
|
||||||
pub fn request_async(
|
pub fn request_async(
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
query: String,
|
query: String,
|
||||||
|
|
@ -128,7 +128,7 @@ pub fn request_async(
|
||||||
Some(&cancellable.clone()),
|
Some(&cancellable.clone()),
|
||||||
move |result| match result {
|
move |result| match result {
|
||||||
Ok(_) => {
|
Ok(_) => {
|
||||||
Response::from_request_async(connection, priority, cancellable, move |result| {
|
Response::from_connection_async(connection, priority, cancellable, move |result| {
|
||||||
callback(match result {
|
callback(match result {
|
||||||
Ok(response) => Ok(response),
|
Ok(response) => Ok(response),
|
||||||
Err(e) => Err(Error::Response(e)),
|
Err(e) => Err(Error::Response(e)),
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ pub struct Response {
|
||||||
impl Response {
|
impl Response {
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
pub fn from_request_async(
|
/// Create new `Self` from given `Connection`
|
||||||
|
/// * useful for manual [IOStream](https://docs.gtk.org/gio/class.IOStream.html) handle (based on `Meta` bytes pre-parsed)
|
||||||
|
pub fn from_connection_async(
|
||||||
connection: Connection,
|
connection: Connection,
|
||||||
priority: Priority,
|
priority: Priority,
|
||||||
cancellable: Cancellable,
|
cancellable: Cancellable,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue