pub struct CFHTTPMessage { /* private fields */ }Available on crate feature
CFHTTPMessage only.Expand description
Implementations§
Source§impl CFHTTPMessage
impl CFHTTPMessage
Sourcepub unsafe fn apply_credentials(
&self,
auth: &CFHTTPAuthentication,
username: Option<&CFString>,
password: Option<&CFString>,
error: *mut CFStreamError,
) -> bool
Available on crate feature CFHTTPAuthentication only.
pub unsafe fn apply_credentials( &self, auth: &CFHTTPAuthentication, username: Option<&CFString>, password: Option<&CFString>, error: *mut CFStreamError, ) -> bool
CFHTTPAuthentication only.§Safety
error must be a valid pointer or null.
Sourcepub unsafe fn apply_credential_dictionary(
&self,
auth: &CFHTTPAuthentication,
dict: &CFDictionary,
error: *mut CFStreamError,
) -> bool
Available on crate feature CFHTTPAuthentication only.
pub unsafe fn apply_credential_dictionary( &self, auth: &CFHTTPAuthentication, dict: &CFDictionary, error: *mut CFStreamError, ) -> bool
CFHTTPAuthentication only.§Safety
dictgenerics must be of the correct type.errormust be a valid pointer or null.
Source§impl CFHTTPMessage
impl CFHTTPMessage
pub unsafe fn new_request( alloc: Option<&CFAllocator>, request_method: &CFString, url: &CFURL, http_version: &CFString, ) -> CFRetained<CFHTTPMessage>
pub unsafe fn new_response( alloc: Option<&CFAllocator>, status_code: CFIndex, status_description: Option<&CFString>, http_version: &CFString, ) -> CFRetained<CFHTTPMessage>
pub unsafe fn new_empty( alloc: Option<&CFAllocator>, is_request: bool, ) -> CFRetained<CFHTTPMessage>
pub unsafe fn new_copy( alloc: Option<&CFAllocator>, message: &CFHTTPMessage, ) -> CFRetained<CFHTTPMessage>
pub unsafe fn is_request(&self) -> bool
pub unsafe fn version(&self) -> CFRetained<CFString>
pub unsafe fn body(&self) -> Option<CFRetained<CFData>>
pub unsafe fn set_body(&self, body_data: &CFData)
pub unsafe fn header_field_value( &self, header_field: &CFString, ) -> Option<CFRetained<CFString>>
pub unsafe fn all_header_fields(&self) -> Option<CFRetained<CFDictionary>>
pub unsafe fn set_header_field_value( &self, header_field: &CFString, value: Option<&CFString>, )
Sourcepub unsafe fn append_bytes(
&self,
new_bytes: NonNull<u8>,
num_bytes: CFIndex,
) -> bool
pub unsafe fn append_bytes( &self, new_bytes: NonNull<u8>, num_bytes: CFIndex, ) -> bool
§Safety
new_bytes must be a valid pointer.
pub unsafe fn is_header_complete(&self) -> bool
pub unsafe fn serialized_message(&self) -> Option<CFRetained<CFData>>
Sourcepub unsafe fn request_url(&self) -> Option<CFRetained<CFURL>>
pub unsafe fn request_url(&self) -> Option<CFRetained<CFURL>>
pub unsafe fn request_method(&self) -> Option<CFRetained<CFString>>
pub unsafe fn add_authentication( &self, authentication_failure_response: Option<&CFHTTPMessage>, username: &CFString, password: &CFString, authentication_scheme: Option<&CFString>, for_proxy: bool, ) -> bool
Sourcepub unsafe fn response_status_code(&self) -> CFIndex
pub unsafe fn response_status_code(&self) -> CFIndex
pub unsafe fn response_status_line(&self) -> Option<CFRetained<CFString>>
Methods from Deref<Target = CFType>§
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ConcreteType,
Attempt to downcast the type to that of type T.
This is the reference-variant. Use CFRetained::downcast if you
want to convert a retained type. See also ConcreteType for more
details on which types support being converted to.
Sourcepub fn retain_count(&self) -> usize
pub fn retain_count(&self) -> usize
Get the reference count of the object.
This function may be useful for debugging. You normally do not use this function otherwise.
Beware that some things (like CFNumbers, small CFStrings etc.) may
not have a normal retain count for optimization purposes, and can
return usize::MAX in that case.
Trait Implementations§
Source§impl AsRef<AnyObject> for CFHTTPMessage
impl AsRef<AnyObject> for CFHTTPMessage
Source§impl AsRef<CFHTTPMessage> for CFHTTPMessage
impl AsRef<CFHTTPMessage> for CFHTTPMessage
Source§impl AsRef<CFType> for CFHTTPMessage
impl AsRef<CFType> for CFHTTPMessage
Source§impl Borrow<AnyObject> for CFHTTPMessage
impl Borrow<AnyObject> for CFHTTPMessage
Source§impl Borrow<CFType> for CFHTTPMessage
impl Borrow<CFType> for CFHTTPMessage
Source§impl ConcreteType for CFHTTPMessage
impl ConcreteType for CFHTTPMessage
Source§impl Debug for CFHTTPMessage
impl Debug for CFHTTPMessage
Source§impl Deref for CFHTTPMessage
impl Deref for CFHTTPMessage
Source§impl Hash for CFHTTPMessage
impl Hash for CFHTTPMessage
Source§impl Message for CFHTTPMessage
impl Message for CFHTTPMessage
Source§impl PartialEq for CFHTTPMessage
impl PartialEq for CFHTTPMessage
Source§impl RefEncode for CFHTTPMessage
impl RefEncode for CFHTTPMessage
Source§const ENCODING_REF: Encoding
const ENCODING_REF: Encoding
The Objective-C type-encoding for a reference of this type. Read more
Source§impl Type for CFHTTPMessage
impl Type for CFHTTPMessage
Source§fn retain(&self) -> CFRetained<Self>where
Self: Sized,
fn retain(&self) -> CFRetained<Self>where
Self: Sized,
Increment the reference count of the receiver. Read more
Source§fn as_concrete_TypeRef(&self) -> &Self
fn as_concrete_TypeRef(&self) -> &Self
👎Deprecated: this is redundant
Helper for easier transition from the
core-foundation crate.Source§unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_get_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
👎Deprecated: use CFRetained::retain
Helper for easier transition from the
core-foundation crate. Read moreSource§fn as_CFTypeRef(&self) -> &CFType
fn as_CFTypeRef(&self) -> &CFType
👎Deprecated: this is redundant (CF types deref to CFType)
Helper for easier transition from the
core-foundation crate.Source§unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
unsafe fn wrap_under_create_rule(ptr: *const Self) -> CFRetained<Self>where
Self: Sized,
👎Deprecated: use CFRetained::from_raw
Helper for easier transition from the
core-foundation crate. Read moreimpl Eq for CFHTTPMessage
Auto Trait Implementations§
impl !Freeze for CFHTTPMessage
impl !RefUnwindSafe for CFHTTPMessage
impl !Send for CFHTTPMessage
impl !Sync for CFHTTPMessage
impl !Unpin for CFHTTPMessage
impl !UnwindSafe for CFHTTPMessage
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