Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/abonander/anterofit
/ functions
Functions
170 in github.com/abonander/anterofit
⨍
Functions
170
◇
Types & classes
74
↓ 11 callers
Method
into
(self)
src/net/response.rs:39
↓ 8 callers
Method
into_opt_obj
(self)
src/net/intercept.rs:121
↓ 8 callers
Method
push
(&mut self, key: K, val: V)
src/net/body.rs:211
↓ 7 callers
Method
clone
(&self)
src/mpmc.rs:90
↓ 5 callers
Method
block
Block on this call until a result is available. Depending on the stage of the request, this may return immediately. Call `is_immediate()` check for t
src/net/call.rs:47
↓ 5 callers
Method
clone
(&self)
src/adapter.rs:178
↓ 5 callers
Method
exec
(self)
src/net/request.rs:336
↓ 4 callers
Method
chain
Chain `self` with `then`, invoking `self` then `then` for each request.
src/net/intercept.rs:37
↓ 4 callers
Method
iter
Get a blocking iterator that yields `None` when the queue is closed. `IntoIter` is also implemented for `&Receiver`.
src/mpmc.rs:84
↓ 3 callers
Method
complete
Send a result, which will prevent the head being sent on-panic.
src/net/call.rs:174
↓ 3 callers
Method
deserialize
(&self, read: &mut R)
src/serialize/mod.rs:130
↓ 3 callers
Method
insert
Add a key-value pair to the end of this series.
src/serialize/mod.rs:64
↓ 3 callers
Method
into_iter
(self)
src/mpmc.rs:99
↓ 3 callers
Method
into_pairs
Take the key-value pair series as a vector of 2-tuples.
src/serialize/mod.rs:79
↓ 3 callers
Method
next
(&mut self)
src/mpmc.rs:119
↓ 3 callers
Method
send
(&self, exec: Box<ExecBox>)
src/mpmc.rs:41
↓ 3 callers
Method
serialize
(&self, s: S)
src/serialize/mod.rs:103
↓ 3 callers
Function
spawn_thread
(thread: usize, recv: Receiver)
src/executor/threaded.rs:78
↓ 3 callers
Method
take_while
(&mut self, mut predicate: F)
service-attr/src/lib.rs:310
↓ 2 callers
Method
base_url
Set the base URL that the adapter will use for all requests. If a base URL is not provided, then all service method URLs are assumed to be absolute.
src/adapter.rs:46
↓ 2 callers
Method
body
Set a body to be sent with the request. Generally, `GET` and `DELETE` are not to have bodies If you need to have a body on a GET or DELETE request
src/net/request.rs:271
↓ 2 callers
Method
build
Using the supplied types, complete the adapter. `<E as Executor>::start()` will be called here.
src/adapter.rs:141
↓ 2 callers
Method
content_type
Returns `application/json`.
src/serialize/json.rs:24
↓ 2 callers
Method
exec_here
(self)
src/net/request.rs:340
↓ 2 callers
Method
expect_keyword
(&mut self, expect: &str)
service-attr/src/lib.rs:246
↓ 2 callers
Method
get_posts
Get all posts.
service-attr/examples/post_service.rs:45
↓ 2 callers
Method
header
(&self, out: &mut Tokens)
service-attr/src/lib.rs:144
↓ 2 callers
Method
header
Set an HTTP header for this request, overwriting any previous value. ##Note Some headers, such as `Content-Type`, may be overwritten by Anterofit.
src/net/request.rs:58
↓ 2 callers
Function
immediate
Implementation detail
src/net/call.rs:154
↓ 2 callers
Method
into_readable
(self, ser: &S)
src/net/body.rs:67
↓ 2 callers
Method
is_available
Return `true` if a result is available (a call to `check()` will return the result).
src/net/call.rs:69
↓ 2 callers
Function
json
`application/json`
src/mime.rs:11
↓ 2 callers
Method
method_impl
(&self, get_adpt: &[TokenTree], out: &mut Tokens)
service-attr/src/lib.rs:167
↓ 2 callers
Method
new_post
Create a new Post under the given user ID with the given title and body.
service-attr/examples/post_service.rs:57
↓ 2 callers
Function
oneshot
Implementation detail
src/net/call.rs:139
↓ 2 callers
Method
poll_by
(&mut self, poll: F)
src/net/call.rs:94
↓ 2 callers
Method
recv
Poll the queue, blocking if it is empty. Returns `None` when the sending half of the queue is closed.
src/mpmc.rs:63
↓ 2 callers
Method
ref_consts
(&self)
src/adapter.rs:324
↓ 2 callers
Method
serialize_json
Convenience method for using JSON serialization. Enabled with either the `rust-serialize` feature or the `serde-json` feature.
src/adapter.rs:129
↓ 2 callers
Method
wait
(&self)
src/mpmc.rs:55
↓ 1 callers
Method
add_self
(self: Self, name: String, filename: Option<String>, content_type: Option<Mime>, to: &mut Multipart)
src/net/body.rs:364
↓ 1 callers
Method
append_url
Append `append` to the URL of this request. If this causes the request's URL to be malformed, an error will immediately be returned by `init_request(
src/net/request.rs:85
↓ 1 callers
Function
assert_generics_empty
(generics: &Generics)
service-attr/src/lib.rs:33
↓ 1 callers
Method
bytes
Wrap anything `Cursor` can work with (such as `String` or `Vec<u8>`) as a raw request body. Assumes `application/octet-stream` as the content-type.
src/net/body.rs:112
↓ 1 callers
Method
chain2
Chain `self` with two more interceptors. Saves a level in debug printing, mainly.
src/net/intercept.rs:44
↓ 1 callers
Function
channel
()
src/mpmc.rs:11
↓ 1 callers
Method
check
Poll this call for a result. Convenience wrapper for `poll_no_task()` which doesn't use types from `futures`. Returns `None` in two cases: The resu
src/net/call.rs:59
↓ 1 callers
Function
collect_items
(items: Vec<TraitItem>)
service-attr/src/lib.rs:104
↓ 1 callers
Method
consts
(&self)
src/adapter.rs:328
↓ 1 callers
Function
create_post
Create a new Post. Since the same adapter will implement all service traits, you can arbitrarily concatenate them in generic bounds.
service-attr/examples/post_service.rs:90
↓ 1 callers
Function
create_post
Create a new Post.
examples/post_service.rs:89
↓ 1 callers
Method
debug
(&self, f: &mut fmt::Formatter)
src/net/intercept.rs:67
↓ 1 callers
Method
decl
(&self, out: &mut Tokens)
service-attr/src/lib.rs:162
↓ 1 callers
Method
deserializer
Set a new `Deserializer` impl for the adapter.
src/adapter.rs:111
↓ 1 callers
Method
exec
(self: Box<Self>)
src/executor/mod.rs:38
↓ 1 callers
Function
exec_request
(consts: &AdapterConsts<S, D>, interceptor: Option<&Interceptor>, head: &mut RequestHead, body: B)
src/net/request.rs:461
↓ 1 callers
Function
fetch_posts
Fetch the top 3 posts in the database. Service traits are object-safe, but you can't concatenate them arbitrarily (language limitation). If you use mu
service-attr/examples/post_service.rs:106
↓ 1 callers
Function
fetch_posts
Fetch the top 3 posts in the database. Service traits can be object-safe
examples/post_service.rs:103
↓ 1 callers
Method
fmt_debug
(&self, f: &mut fmt::Formatter)
src/net/intercept.rs:232
↓ 1 callers
Function
form_urlencoded
`application/www-form-urlencoded`
src/mime.rs:16
↓ 1 callers
Function
formdata
`multipart/form-data; boundary={boundary}`
src/mime.rs:21
↓ 1 callers
Method
get_body_inner
(&mut self)
service-attr/src/lib.rs:298
↓ 1 callers
Method
get_generics
(&mut self)
service-attr/src/lib.rs:254
↓ 1 callers
Method
get_type
(&mut self)
service-attr/src/lib.rs:278
↓ 1 callers
Method
get_where
(&mut self)
service-attr/src/lib.rs:286
↓ 1 callers
Method
head_mut
Get a mutable reference to the header of the request. Can be used to change the request URL, add GET query pairs or HTTP headers to be sent with the
src/net/request.rs:237
↓ 1 callers
Method
headers
Copy all the HTTP headers from `headers` into this request. Duplicate headers will be overwritten. ##Note Some headers, such as `Content-Type`, may
src/net/request.rs:69
↓ 1 callers
Method
ignore
Ignore the result of this call. Equivalent to `let _ = self` but more friendly for method-chaining.
src/net/call.rs:37
↓ 1 callers
Method
init_request
Initialize a `hyper::client::RequestBuilder` with the parameters in this header. If provided, `base_url` will be prepended to the URL associated with
src/net/request.rs:162
↓ 1 callers
Method
intercept
(&self, req: &mut RequestHead)
src/net/intercept.rs:20
↓ 1 callers
Method
interceptor
Set a new interceptor for the adapter.
src/adapter.rs:72
↓ 1 callers
Function
map_poll
(poll: Poll<Result<T>, Canceled>)
src/net/call.rs:189
↓ 1 callers
Function
octet_stream
`application/octet-stream`
src/mime.rs:6
↓ 1 callers
Method
on_complete
Add a callback to be executed with the request's return value when available, mapping it to another value (or `()` if no return value). `on_complete`
src/net/request.rs:406
↓ 1 callers
Method
on_result
Add a callback to be executed with the request's result when available, mapping it to another result (which can be `::Result<()>`). If a result is im
src/net/request.rs:430
↓ 1 callers
Method
output
(&self)
service-attr/src/lib.rs:64
↓ 1 callers
Method
pair_mut
Add a query key-value pair to this interceptor. Returns `&mut self` for builder-style usage. `key` and `val` can be any of: `String`, `&'static str`
src/net/intercept.rs:208
↓ 1 callers
Method
pairs
Get the current series of pairs as a slice.
src/serialize/mod.rs:69
↓ 1 callers
Method
parse
(mut tokens: Vec<TokenTree>)
service-attr/src/lib.rs:191
↓ 1 callers
Method
poll_no_task
Poll the inner future without requiring a task. You can call `is_available()` to check readiness.
src/net/call.rs:89
↓ 1 callers
Method
posts_by_user
Get all posts by a specific user
service-attr/examples/post_service.rs:50
↓ 1 callers
Function
prepend_str
(prepend: &str, to: &mut String)
src/net/request.rs:479
↓ 1 callers
Method
prepend_url
Prepend `prepend` to the URL of this request. This will appear between the current request URL and the base URL supplied by the adapter, if present,
src/net/request.rs:99
↓ 1 callers
Method
query
Add a series of key-value pairs to this request's query. These will appear in the request URL. Characters that are not allowed to appear in a URL wil
src/net/request.rs:130
↓ 1 callers
Method
serializer
Set a new `Serializer` impl for the adapter.
src/adapter.rs:98
↓ 1 callers
Method
set
Set a new interceptor, discarding the old one.
src/adapter.rs:226
↓ 1 callers
Method
start
Spawn new worker threads to complete jobs. The threads will be named such that they can easily be associated with Anterofit. If a panic occurs on a w
src/executor/threaded.rs:32
↓ 1 callers
Function
text_plain_utf8
`text/plain; charset=utf8`
src/mime.rs:26
↓ 1 callers
Method
to_hyper
(&self)
src/net/method.rs:56
↓ 1 callers
Function
user_posts
(post_service: &PostService)
examples/post_service.rs:114
↓ 1 callers
Method
with_file
(self, key: K, file: FileField)
src/net/body.rs:186
↓ 1 callers
Method
with_text
(self, key: K, val: V)
src/net/body.rs:182
Method
add_to
(self, key: K, to: F)
src/net/body.rs:379
Method
apply
Pass `self` to the closure, allowing it to mutate and transform the builder arbitrarily. `try!()` will work in this closure.
src/net/request.rs:245
Method
arc_service
Get a service trait object from an existing shared allocation. Requires that the service implement `UnsizeService`.
src/adapter.rs:296
Method
body_eager
Immediately serialize `body` on the current thread and set the result as the body of this request. This is useful if you want to use a body type that
src/net/request.rs:287
Method
build
Prepare a `Request` to be executed with the parameters supplied in this builder. This request will need to be executed (using `exec()` or `exec_here(
src/net/request.rs:301
Method
builder
Start building an impl of `Adapter` using the default inner types.
src/adapter.rs:187
Method
chain_after
Chain the given `Interceptor` after the one currently in the adapter. Equivalent to `set(after)` if the adapter does not have an interceptor or was c
src/adapter.rs:245
Method
chain_around
Chain the given `Interceptor`s before and after the one currently in the adapter. This saves a level of boxing over calling `chain_before()` and `cha
src/adapter.rs:259
next →
1–100 of 170, ranked by callers