pub enum WellKnownTypes {
Listener,
HttpConnectionManager,
RouteConfiguration,
ScopedRouteConfiguration,
VirtualHost,
Cluster,
ClusterLoadAssignment,
Secret,
Runtime,
}
Expand description
Well known types that Any messages may contain while
dealing with XDS DiscoveryRequest
s and DiscoveryResponse
s.
This type currently suppors the top-level types for xDS services and the
HttpConnectionManager
type that most applications will need to work
with while managing a Listener
. It doesn’t include support for
extension types or typed configs.
match WellKnownTypes::from_type_url(&any.type_url) {
Some(WellKnownTypes::Listener) => {
do_something_with_listener(Listener::decode(&any.value).unwrap())
}
_ => todo!(),
}
§pbjson
With the pbjson
feature enabled, Any messages use
WellKnownTypes
for canonical json conversion and any type listed in
WellKnownTypes
will be serialized as a struct instead of as an opaque
blob. For example, an Any
containing an
HttpConnectionManager would serialize
to.
{
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"route_config": {
"name": "test_route"
}
}
Variants§
Listener
An XDS Listener for LDS.
HttpConnectionManager
An HttpConnectionManager, included in XDS Listeners.
RouteConfiguration
A RouteConfiguration
type, used in RDS.
ScopedRouteConfiguration
A ScopedRouteConfiguration
, used in SRDS.
VirtualHost
A VirtualHost
, used in VHDS.
Cluster
A Cluster
, used in CDS
ClusterLoadAssignment
A ClusterLoadAssignment
, used in EDS.
Secret
A Secret
, used in SDS.
Runtime
A Runtime
, used in RTDS.
Implementations§
Source§impl WellKnownTypes
impl WellKnownTypes
pub fn all() -> &'static [WellKnownTypes]
pub fn from_type_url(type_url: &str) -> Option<Self>
pub fn type_url(&self) -> &'static str
Trait Implementations§
Source§impl Clone for WellKnownTypes
impl Clone for WellKnownTypes
Source§fn clone(&self) -> WellKnownTypes
fn clone(&self) -> WellKnownTypes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WellKnownTypes
impl Debug for WellKnownTypes
Source§impl Enum for WellKnownTypes
impl Enum for WellKnownTypes
Source§impl<V> EnumArray<V> for WellKnownTypes
impl<V> EnumArray<V> for WellKnownTypes
Source§impl PartialEq for WellKnownTypes
impl PartialEq for WellKnownTypes
impl Copy for WellKnownTypes
impl Eq for WellKnownTypes
impl StructuralPartialEq for WellKnownTypes
Auto Trait Implementations§
impl Freeze for WellKnownTypes
impl RefUnwindSafe for WellKnownTypes
impl Send for WellKnownTypes
impl Sync for WellKnownTypes
impl Unpin for WellKnownTypes
impl UnwindSafe for WellKnownTypes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request