pub struct ProtectedResource {
pub resource: String,
pub authorization_servers: Vec<String>,
pub scopes_supported: Option<Vec<String>>,
}Expand description
What a client reads from protected resource metadata.
Fields§
§resource: StringThe resource identifier the document describes.
The authorization servers, in the order listed.
scopes_supported: Option<Vec<String>>The scopes the resource lists, if it lists any.
Implementations§
Source§impl ProtectedResource
impl ProtectedResource
Sourcepub fn parse(body: &[u8]) -> Result<Self, MetadataError>
pub fn parse(body: &[u8]) -> Result<Self, MetadataError>
Parses an RFC 9728 document.
§Errors
MetadataError for a body that is not an object, or that lacks
resource or a non-empty authorization_servers.
Trait Implementations§
Source§impl Clone for ProtectedResource
impl Clone for ProtectedResource
Source§impl Debug for ProtectedResource
impl Debug for ProtectedResource
impl Eq for ProtectedResource
Source§impl PartialEq for ProtectedResource
impl PartialEq for ProtectedResource
impl StructuralPartialEq for ProtectedResource
Auto Trait Implementations§
impl Freeze for ProtectedResource
impl RefUnwindSafe for ProtectedResource
impl Send for ProtectedResource
impl Sync for ProtectedResource
impl Unpin for ProtectedResource
impl UnsafeUnpin for ProtectedResource
impl UnwindSafe for ProtectedResource
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