Struct json_feed_model::Hub
source · [−]pub struct Hub { /* private fields */ }
Expand description
A subscription endpoint which can be used to receive feed update notifications.
Valid Hub
A Hub
must have both the type
and url
properties set.
Implementations
sourceimpl Hub
impl Hub
sourcepub fn as_map_mut(&mut self) -> &mut Map<String, Value>
pub fn as_map_mut(&mut self) -> &mut Map<String, Value>
Returns the inner Map
as a mutable reference.
sourcepub fn into_inner(self) -> Map<String, Value>
pub fn into_inner(self) -> Map<String, Value>
Converts the type into the inner Map
.
sourcepub fn hub_type(&self) -> Result<Option<&str>, Error>
pub fn hub_type(&self) -> Result<Option<&str>, Error>
The required protocol which is used to subscribe with.
sourcepub fn set_hub_type<T>(&mut self, value: T) -> Option<Value> where
T: ToString,
pub fn set_hub_type<T>(&mut self, value: T) -> Option<Value> where
T: ToString,
Sets the type.
sourcepub fn remove_hub_type(&mut self) -> Option<Value>
pub fn remove_hub_type(&mut self) -> Option<Value>
Removes the type.
sourcepub fn url(&self) -> Result<Option<&str>, Error>
pub fn url(&self) -> Result<Option<&str>, Error>
A required hub type specific URL which is used to subscribe with.
sourcepub fn remove_url(&mut self) -> Option<Value>
pub fn remove_url(&mut self) -> Option<Value>
Removes the URL.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Hub
impl<'de> Deserialize<'de> for Hub
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Hub
Auto Trait Implementations
impl RefUnwindSafe for Hub
impl Send for Hub
impl Sync for Hub
impl Unpin for Hub
impl UnwindSafe for Hub
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more