Enum apollo_router::SchemaSource
source ยท #[non_exhaustive]pub enum SchemaSource {
Static {
schema_sdl: String,
},
Stream(Pin<Box<dyn Stream<Item = String> + Send>>),
File {
path: PathBuf,
watch: bool,
delay: Option<Duration>,
},
Registry(UplinkConfig),
URLs {
urls: Vec<Url>,
watch: bool,
period: Duration,
},
}Expand description
The user supplied schema. Either a static string or a stream for hot reloading.
Variants (Non-exhaustive)ยง
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Static
A static schema.
Stream(Pin<Box<dyn Stream<Item = String> + Send>>)
A stream of schema.
File
Fields
A YAML file that may be watched for changes.
Registry(UplinkConfig)
Apollo managed federation.
URLs
Fields
A list of URLs to fetch the schema from.
Trait Implementationsยง
sourceยงimpl Debug for SchemaSource
impl Debug for SchemaSource
sourceยงimpl Display for SchemaSource
impl Display for SchemaSource
sourceยงimpl From<&str> for SchemaSource
impl From<&str> for SchemaSource
sourceยงimpl From<String> for SchemaSource
impl From<String> for SchemaSource
sourceยงfn from(original: String) -> SchemaSource
fn from(original: String) -> SchemaSource
Converts to this type from the input type.
sourceยงimpl From<UplinkConfig> for SchemaSource
impl From<UplinkConfig> for SchemaSource
sourceยงfn from(original: UplinkConfig) -> SchemaSource
fn from(original: UplinkConfig) -> SchemaSource
Converts to this type from the input type.
Auto Trait Implementationsยง
impl !RefUnwindSafe for SchemaSource
impl Send for SchemaSource
impl !Sync for SchemaSource
impl Unpin for SchemaSource
impl !UnwindSafe for SchemaSource
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> FutureExt for T
impl<T> FutureExt for T
sourceยงfn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourceยงfn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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>
Wrap the input message
T in a tonic::RequestCreates a shared type from an unshared type.