Skip to main content

SdpWarning

Enum SdpWarning 

Source
#[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
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.
§

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

§attribute: String

The attribute name, e.g. "ptime" or "maxptime".

§raw_value: String

The raw on-wire value that could not be parsed.

§

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

§raw: String

The raw qualifier part that could not be parsed (e.g. "9999999999h").

§reason: String

Why parsing failed.

§

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

§codec_name: String

The codec name for which fmtp could not be embedded.

§fmtp: String

The fmtp value that could not be represented.

§reason: String

Human-readable reason the fmtp could not be embedded.

§

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

§codec_name: String

The raw, unrepresentable encoding name from a=rtpmap.

§reason: String

Human-readable reason the name could not be embedded.

§

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

§media_type: String

The media type of the skipped section (e.g. "audio").

§reason: String

Human-readable reason the section could not be parsed.

§

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

§entries: usize

How many comma-separated slots the input carried.

§

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.

Fields

§attribute: String

The attribute name as the peer spelled it.

Trait Implementations§

Source§

impl Clone for SdpWarning

Source§

fn clone(&self) -> SdpWarning

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SdpWarning

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SdpWarning

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for SdpWarning

Source§

impl PartialEq for SdpWarning

Source§

fn eq(&self, other: &SdpWarning) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for SdpWarning

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.