Enum jsonrpc_http_server::RestApi
source · [−]pub enum RestApi {
Secure,
Unsecure,
Disabled,
}
Expand description
REST -> RPC converter state.
Variants
Secure
The REST -> RPC converter is enabled
and requires Content-Type: application/json
header
(even though the body should be empty).
This protects from submitting an RPC call
from unwanted origins.
Unsecure
The REST -> RPC converter is enabled
and does not require any Content-Type
headers.
NOTE: This allows sending RPCs via HTTP forms
from any website.
Disabled
The REST -> RPC converter is disabled.
Trait Implementations
impl Copy for RestApi
impl StructuralPartialEq for RestApi
Auto Trait Implementations
impl RefUnwindSafe for RestApi
impl Send for RestApi
impl Sync for RestApi
impl Unpin for RestApi
impl UnwindSafe for RestApi
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more