#[non_exhaustive]pub struct Response { /* private fields */ }
Available on crate features
client
or server
only.Expand description
Response type for the get_profile
endpoint.
Implementations§
Source§impl Response
impl Response
Sourcepub fn get(&self, field: &str) -> Option<&JsonValue>
pub fn get(&self, field: &str) -> Option<&JsonValue>
Returns the value of the given capability.
Sourcepub fn get_static<F: StaticProfileField>(
&self,
) -> Result<Option<F::Value>, Error>
Available on crate feature unstable-msc4133
only.
pub fn get_static<F: StaticProfileField>( &self, ) -> Result<Option<F::Value>, Error>
unstable-msc4133
only.Returns the value of the given StaticProfileField
.
Returns Ok(Some(_))
if the field is present and the value was deserialized
successfully, Ok(None)
if the field is not set, or an error if deserialization of the
value failed.
Trait Implementations§
Source§impl Extend<(ProfileFieldName, Value)> for Response
Available on crate feature unstable-msc4133
only.
impl Extend<(ProfileFieldName, Value)> for Response
Available on crate feature
unstable-msc4133
only.Source§fn extend<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>(
&mut self,
iter: T,
)
fn extend<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>( &mut self, iter: T, )
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<(String, Value)> for Response
impl Extend<(String, Value)> for Response
Source§fn extend<T: IntoIterator<Item = (String, JsonValue)>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = (String, JsonValue)>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl Extend<ProfileFieldValue> for Response
Available on crate feature unstable-msc4133
only.
impl Extend<ProfileFieldValue> for Response
Available on crate feature
unstable-msc4133
only.Source§fn extend<T: IntoIterator<Item = ProfileFieldValue>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = ProfileFieldValue>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one
)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl FromIterator<(ProfileFieldName, Value)> for Response
Available on crate feature unstable-msc4133
only.
impl FromIterator<(ProfileFieldName, Value)> for Response
Available on crate feature
unstable-msc4133
only.Source§fn from_iter<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>(
iter: T,
) -> Self
fn from_iter<T: IntoIterator<Item = (ProfileFieldName, JsonValue)>>( iter: T, ) -> Self
Creates a value from an iterator. Read more
Source§impl FromIterator<ProfileFieldValue> for Response
Available on crate feature unstable-msc4133
only.
impl FromIterator<ProfileFieldValue> for Response
Available on crate feature
unstable-msc4133
only.Source§fn from_iter<T: IntoIterator<Item = ProfileFieldValue>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = ProfileFieldValue>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl IncomingResponse for Response
Available on crate feature client
only.
impl IncomingResponse for Response
Available on crate feature
client
only.Source§type EndpointError = Error
type EndpointError = Error
A type capturing the expected error conditions the server can return.
Source§fn try_from_http_response<T: AsRef<[u8]>>(
response: Response<T>,
) -> Result<Self, FromHttpResponseError<Error>>
fn try_from_http_response<T: AsRef<[u8]>>( response: Response<T>, ) -> Result<Self, FromHttpResponseError<Error>>
Tries to convert the given
http::Response
into this response type.Source§impl IntoIterator for Response
impl IntoIterator for Response
Source§impl OutgoingResponse for Response
Available on crate feature server
only.
impl OutgoingResponse for Response
Available on crate feature
server
only.Source§fn try_into_http_response<T: Default + BufMut>(
self,
) -> Result<Response<T>, IntoHttpError>
fn try_into_http_response<T: Default + BufMut>( self, ) -> Result<Response<T>, IntoHttpError>
Tries to convert this response into an
http::Response
. Read moreAuto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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