Struct jsonrpsee_core::server::access_control::AccessControlBuilder
source · pub struct AccessControlBuilder { /* private fields */ }
Expand description
Convenience builder pattern
Implementations§
source§impl AccessControlBuilder
impl AccessControlBuilder
sourcepub fn allow_all_hosts(self) -> Self
pub fn allow_all_hosts(self) -> Self
Allow all hosts.
sourcepub fn allow_all_origins(self) -> Self
pub fn allow_all_origins(self) -> Self
Allow all origins.
sourcepub fn allow_all_headers(self) -> Self
pub fn allow_all_headers(self) -> Self
Allow all headers.
sourcepub fn set_allowed_hosts<List, H>(self, list: List) -> Result<Self, Error>where
List: IntoIterator<Item = H>,
H: Into<String>,
pub fn set_allowed_hosts<List, H>(self, list: List) -> Result<Self, Error>where
List: IntoIterator<Item = H>,
H: Into<String>,
Configure allowed hosts.
Default - allow all.
sourcepub fn set_allowed_origins<Origin, List>(self, list: List) -> Result<Self, Error>where
List: IntoIterator<Item = Origin>,
Origin: Into<String>,
pub fn set_allowed_origins<Origin, List>(self, list: List) -> Result<Self, Error>where
List: IntoIterator<Item = Origin>,
Origin: Into<String>,
Configure allowed origins.
Default - allow all.
sourcepub fn set_allowed_headers<Header, List>(self, list: List) -> Result<Self, Error>where
List: IntoIterator<Item = Header>,
Header: Into<String>,
pub fn set_allowed_headers<Header, List>(self, list: List) -> Result<Self, Error>where
List: IntoIterator<Item = Header>,
Header: Into<String>,
Configure allowed CORS headers.
Default - allow all.
sourcepub fn build(self) -> AccessControl
pub fn build(self) -> AccessControl
Finalize the AccessControl
settings.