pub struct DestinationRule { /* private fields */ }Expand description
One allowed destination: a host (exact, or a domain with its subdomains), the ports it may be
reached on and the resource classes it may serve. Only https and wss ever match; a plaintext
scheme does not, so a credentialed session never speaks http or ws.
Implementations§
Source§impl DestinationRule
impl DestinationRule
Sourcepub fn exact(host: &str) -> Result<Self>
pub fn exact(host: &str) -> Result<Self>
One host, exactly. Port 443 and every resource class until narrowed.
Sourcepub fn subdomains_of(domain: &str) -> Result<Self>
pub fn subdomains_of(domain: &str) -> Result<Self>
A domain and every subdomain of it (example.com and a.example.com, never notexample.com).
Port 443 and every resource class until narrowed.
Sourcepub fn on_ports(self, ports: &[u16]) -> Self
pub fn on_ports(self, ports: &[u16]) -> Self
Replace the allowed ports. An empty list allows none, so the rule never matches.
Sourcepub fn for_classes(self, classes: &[ResourceClass]) -> Self
pub fn for_classes(self, classes: &[ResourceClass]) -> Self
Replace the allowed resource classes. An empty list allows none, so the rule never matches.
Trait Implementations§
Source§impl Clone for DestinationRule
impl Clone for DestinationRule
Source§impl Debug for DestinationRule
impl Debug for DestinationRule
impl Eq for DestinationRule
Source§impl PartialEq for DestinationRule
impl PartialEq for DestinationRule
impl StructuralPartialEq for DestinationRule
Auto Trait Implementations§
impl Forget for DestinationRule
impl Freeze for DestinationRulewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<u16>: Freeze,
PhantomData<ResourceClass>: Freeze,
impl Move for DestinationRule
impl RefUnwindSafe for DestinationRule
impl Send for DestinationRulewhere
RawVecInner: Send,
impl Sync for DestinationRulewhere
RawVecInner: Sync,
impl Unpin for DestinationRule
impl UnsafeUnpin for DestinationRulewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<u16>: UnsafeUnpin,
PhantomData<ResourceClass>: UnsafeUnpin,
impl UnwindSafe for DestinationRulewhere
RawVecInner: UnwindSafe,
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