pub struct ServiceBuilder {
pub id: Option<String>,
pub name: Option<String>,
pub desc: Option<String>,
pub enable_websocket: Option<bool>,
pub upstream: Option<UpstreamRequest>,
pub upstream_id: Option<String>,
pub plugins: Plugins,
pub hosts: Option<Vec<String>>,
}Fields§
§id: Option<String>§name: Option<String>§desc: Option<String>§enable_websocket: Option<bool>§upstream: Option<UpstreamRequest>§upstream_id: Option<String>§plugins: Plugins§hosts: Option<Vec<String>>Implementations§
source§impl ServiceBuilder
impl ServiceBuilder
pub fn new() -> Self
pub fn id(self, id: String) -> Self
sourcepub fn enable_websocket(self, enable_websocket: bool) -> Self
pub fn enable_websocket(self, enable_websocket: bool) -> Self
Enables a websocket. Set to false by default
sourcepub fn upstream(self, upstream: UpstreamRequest) -> Self
pub fn upstream(self, upstream: UpstreamRequest) -> Self
Configuration of the Upstream [@UpstreamRequest]
sourcepub fn upstream_id(self, upstream_id: String) -> Self
pub fn upstream_id(self, upstream_id: String) -> Self
Id of the Upstream
sourcepub fn plugins(self, plugins: Plugins) -> Self
pub fn plugins(self, plugins: Plugins) -> Self
Plugins that are executed during the request/response cycle
sourcepub fn hosts(self, hosts: Vec<String>) -> Self
pub fn hosts(self, hosts: Vec<String>) -> Self
Matches with any one of the multiple hosts specified in the form of a non-empty list
pub fn build(self) -> Result<ServiceRequest, ApisixClientError>
Trait Implementations§
source§impl Clone for ServiceBuilder
impl Clone for ServiceBuilder
source§fn clone(&self) -> ServiceBuilder
fn clone(&self) -> ServiceBuilder
Returns a copy of the value. Read more
1.6.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for ServiceBuilder
impl Debug for ServiceBuilder
source§impl Default for ServiceBuilder
impl Default for ServiceBuilder
source§fn default() -> ServiceBuilder
fn default() -> ServiceBuilder
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for ServiceBuilder
impl<'de> Deserialize<'de> for ServiceBuilder
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ServiceRequest> for ServiceBuilder
impl From<ServiceRequest> for ServiceBuilder
source§fn from(service: ServiceRequest) -> Self
fn from(service: ServiceRequest) -> Self
Converts to this type from the input type.
source§impl PartialEq for ServiceBuilder
impl PartialEq for ServiceBuilder
source§impl Serialize for ServiceBuilder
impl Serialize for ServiceBuilder
impl StructuralPartialEq for ServiceBuilder
Auto Trait Implementations§
impl Freeze for ServiceBuilder
impl RefUnwindSafe for ServiceBuilder
impl Send for ServiceBuilder
impl Sync for ServiceBuilder
impl Unpin for ServiceBuilder
impl UnwindSafe for ServiceBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)