Struct soup::MessageHeaders

source ·
pub struct MessageHeaders { /* private fields */ }
Expand description

GLib type: Shared boxed type with reference counted clone semantics.

Implementations§

source§

impl MessageHeaders

source

pub fn as_ptr(&self) -> *mut SoupMessageHeaders

Return the inner pointer to the underlying C value.

source

pub unsafe fn from_glib_ptr_borrow(ptr: &*mut SoupMessageHeaders) -> &Self

Borrows the underlying C value.

source§

impl MessageHeaders

source

pub fn new(type_: MessageHeadersType) -> MessageHeaders

source

pub fn append(&self, name: &str, value: &str)

source

pub fn clean_connection_headers(&self)

source

pub fn clear(&self)

source

pub fn foreach<P: FnMut(&str, &str)>(&self, func: P)

source

pub fn content_length(&self) -> i64

source

pub fn content_range(&self) -> Option<(i64, i64, i64)>

source

pub fn encoding(&self) -> Encoding

source

pub fn expectations(&self) -> Expectation

source

pub fn headers_type(&self) -> MessageHeadersType

source

pub fn list(&self, name: &str) -> Option<GString>

source

pub fn one(&self, name: &str) -> Option<GString>

source

pub fn header_contains(&self, name: &str, token: &str) -> bool

source

pub fn header_equals(&self, name: &str, value: &str) -> bool

source

pub fn remove(&self, name: &str)

source

pub fn replace(&self, name: &str, value: &str)

source

pub fn set_content_length(&self, content_length: i64)

source

pub fn set_content_range(&self, start: i64, end: i64, total_length: i64)

source

pub fn set_encoding(&self, encoding: Encoding)

source

pub fn set_expectations(&self, expectations: Expectation)

source

pub fn set_range(&self, start: i64, end: i64)

source§

impl MessageHeaders

source

pub fn content_disposition(&self) -> Option<(GString, HashMap<String, String>)>

source

pub fn set_content_disposition( &self, disposition: Option<impl IntoGStr>, params: Option<HashMap<String, String>>, )

source

pub fn content_type(&self) -> Option<(GString, HashMap<String, String>)>

source

pub fn set_content_type( &self, content_type: Option<impl IntoGStr>, params: Option<HashMap<String, String>>, )

Trait Implementations§

source§

impl Clone for MessageHeaders

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the reference. Dropping the reference will decrement it again.

1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for MessageHeaders

source§

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

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

impl From<MessageHeaders> for Value

source§

fn from(s: MessageHeaders) -> Self

Converts to this type from the input type.
source§

impl HasParamSpec for MessageHeaders

§

type ParamSpec = ParamSpecBoxed

§

type SetValue = MessageHeaders

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, MessageHeaders>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for MessageHeaders

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for MessageHeaders

source§

fn cmp(&self, other: &MessageHeaders) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for MessageHeaders

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for MessageHeaders

source§

fn partial_cmp(&self, other: &MessageHeaders) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for MessageHeaders

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for MessageHeaders

source§

impl StructuralPartialEq for MessageHeaders

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§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

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> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

source§

impl<T> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

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

§

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> TransparentType for T

source§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

source§

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

§

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.
source§

impl<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,