#[non_exhaustive]pub enum SdpWarning {
UnparseableNumericAttribute {
attribute: String,
raw_value: String,
},
CodecStringQualifier {
raw: String,
reason: String,
},
FmtpUnrepresentable {
codec_name: String,
fmtp: String,
reason: String,
},
CodecNameUnrepresentable {
codec_name: String,
reason: String,
},
MalformedMediaSection {
media_type: String,
reason: String,
},
CodecStringTruncated {
entries: usize,
limit: usize,
},
NonCanonicalDirectionAttribute {
attribute: String,
},
}Expand description
A recoverable oddity recorded during SDP parsing rather than failed on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnparseableNumericAttribute
A numeric SDP attribute could not be parsed as a positive integer.
FreeSWITCH’s atoi accepts "abc" as 0 and treats 0 as “not set”.
A strict parser records this as a warning rather than hard-failing so
the session is not dropped over a cosmetic attribute.
Fields
CodecStringQualifier
A codec-string qualifier value was skipped during lenient parsing.
Produced by CodecString::parse_lenient when a qualifier overflows u32
or carries no recognised letter. The qualifier is omitted from the parsed entry.
In strict mode (FromStr) the same condition is a hard error.
Fields
FmtpUnrepresentable
A codec’s fmtp could not be embedded in the codec-string entry and was cleared.
Occurs when the offer’s a=fmtp value contains characters that are unrepresentable
in the codec-string format (e.g. a dotted fmtp like br=13.2-24.4 against a bare
policy entry that has no module prefix). The codec entry is still emitted; only the
fmtp qualifier is absent. The original fmtp is preserved here for inspection.
Fields
CodecNameUnrepresentable
An offered codec’s a=rtpmap encoding name cannot be represented as a
codec-string entry at all, and the codec was skipped.
Occurs when the name itself contains a codec-string grammar delimiter
(, @ ~ . ' \ or ASCII whitespace). Unlike
FmtpUnrepresentable, there is no entry to fall
back to — the whole codec is dropped, narrowing the emitted list. Distinct from
UnmappedPayload: that payload type had no rtpmap name whatsoever, whereas this
one has a name that simply cannot survive the codec-string grammar.
Fields
MalformedMediaSection
A single m= section was structurally broken and was skipped entirely.
Occurs when an a=rtpmap, a=fmtp, or m= format-list entry in one media
section cannot be parsed at all (as opposed to CodecNameUnrepresentable,
which drops a single codec). Every other section’s codecs are still parsed
and returned.
Fields
CodecStringTruncated
A lenient parse read more comma-separated slots than FreeSWITCH would.
Every entry parsed is returned; the switch itself keeps only the first
limit slots (switch_types.h:595), empty ones included, and loses the
rest with no log.
Fields
limit: usizeThe cap, CodecString::MAX_SWITCH_ENTRIES.
NonCanonicalDirectionAttribute
A value-less attribute names a direction in a case RFC 8866 does not accept.
It is not read as one, so the section keeps the direction of the level above it — which is what the peer wrote only by coincidence.
Trait Implementations§
Source§impl Clone for SdpWarning
impl Clone for SdpWarning
Source§fn clone(&self) -> SdpWarning
fn clone(&self) -> SdpWarning
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SdpWarning
impl Debug for SdpWarning
Source§impl Display for SdpWarning
impl Display for SdpWarning
impl Eq for SdpWarning
Source§impl PartialEq for SdpWarning
impl PartialEq for SdpWarning
impl StructuralPartialEq for SdpWarning
Auto Trait Implementations§
impl Freeze for SdpWarning
impl RefUnwindSafe for SdpWarning
impl Send for SdpWarning
impl Sync for SdpWarning
impl Unpin for SdpWarning
impl UnsafeUnpin for SdpWarning
impl UnwindSafe for SdpWarning
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.