@@ -75,9 +75,13 @@ impl ResourceCodec {
7575 ///
7676 /// The encoder is generated as an inverse to the input codec: if a decoding configuration was
7777 /// given, we generate an encoder that satisfies that decoding configuration, and vice versa.
78+ ///
79+ /// # Panics
80+ ///
81+ /// Panics if the serializer fails to build, or if the decoding configuration uses a
82+ /// deserializer (`influxdb`, `vrl`) or framing (`octet_counting`, `chunked_gelf`) that has no
83+ /// encoding equivalent.
7884 #[ must_use]
79- // https://github.com/vectordotdev/vector/issues/23659
80- #[ allow( clippy:: missing_panics_doc, reason = "Panic documentation deferred" ) ]
8185 pub fn into_encoder ( & self ) -> Encoder < encoding:: Framer > {
8286 let ( framer, serializer) = match self {
8387 Self :: Encoding ( config) => (
@@ -109,8 +113,16 @@ impl ResourceCodec {
109113 ///
110114 /// The decoder is generated as an inverse to the input codec: if an encoding configuration was
111115 /// given, we generate a decoder that satisfies that encoding configuration, and vice versa.
112- // https://github.com/vectordotdev/vector/issues/23659
113- #[ allow( clippy:: missing_errors_doc, reason = "Error documentation deferred" ) ]
116+ ///
117+ /// # Errors
118+ ///
119+ /// Returns an error if the deserializer cannot be built, such as when a Protobuf descriptor
120+ /// file cannot be loaded.
121+ ///
122+ /// # Panics
123+ ///
124+ /// Panics if the encoding configuration uses a serializer that has no decoding equivalent
125+ /// (`avro`, `cef`, `csv`, `logfmt`, `otlp`, or `syslog`).
114126 pub fn into_decoder ( & self , log_namespace : LogNamespace ) -> vector_lib:: Result < Decoder > {
115127 let ( framer, deserializer) = match self {
116128 Self :: Decoding ( config) => return config. build ( ) ,
@@ -397,8 +409,16 @@ impl ExternalResource {
397409 }
398410
399411 /// Spawns this resource for use as an output for a sink.
400- // https://github.com/vectordotdev/vector/issues/23659
401- #[ allow( clippy:: missing_errors_doc, reason = "Error documentation deferred" ) ]
412+ ///
413+ /// # Errors
414+ ///
415+ /// Returns an error if the decoder for the resource codec cannot be built.
416+ ///
417+ /// # Panics
418+ ///
419+ /// Panics if an HTTP resource uses the `Pull` direction, which is not implemented, or if its
420+ /// URI host is missing or not an IP address. Panics if the codec uses a serializer that has no
421+ /// matching deserializer for validation.
402422 pub fn spawn_as_output (
403423 self ,
404424 output_tx : mpsc:: Sender < Vec < Event > > ,
0 commit comments