pub struct TypedMetadata {
pub title: Option<String>,
pub description: Option<String>,
pub canonical_url: Option<String>,
pub alternate_urls: BTreeMap<String, String>,
pub robots: BTreeSet<RobotsDirective>,
pub json_ld: Vec<JsonLdNode>,
}Fields§
§title: Option<String>§description: Option<String>§canonical_url: Option<String>§alternate_urls: BTreeMap<String, String>§robots: BTreeSet<RobotsDirective>§json_ld: Vec<JsonLdNode>Implementations§
Source§impl TypedMetadata
impl TypedMetadata
pub fn new() -> Self
pub fn with_title( self, title: impl Into<String>, ) -> Result<Self, WasmModelError>
pub fn with_description( self, description: impl Into<String>, ) -> Result<Self, WasmModelError>
pub fn with_canonical_url( self, canonical_url: impl Into<String>, ) -> Result<Self, WasmModelError>
pub fn insert_alternate_url( self, locale: impl Into<String>, url: impl Into<String>, ) -> Result<Self, WasmModelError>
pub fn with_robot_directive(self, directive: RobotsDirective) -> Self
pub fn push_json_ld(self, node: JsonLdNode) -> Self
pub fn merge_from(&mut self, other: &Self)
Trait Implementations§
Source§impl Clone for TypedMetadata
impl Clone for TypedMetadata
Source§fn clone(&self) -> TypedMetadata
fn clone(&self) -> TypedMetadata
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TypedMetadata
impl Debug for TypedMetadata
Source§impl Default for TypedMetadata
impl Default for TypedMetadata
Source§fn default() -> TypedMetadata
fn default() -> TypedMetadata
Returns the “default value” for a type. Read more
Source§impl PartialEq for TypedMetadata
impl PartialEq for TypedMetadata
impl Eq for TypedMetadata
impl StructuralPartialEq for TypedMetadata
Auto Trait Implementations§
impl Freeze for TypedMetadata
impl RefUnwindSafe for TypedMetadata
impl Send for TypedMetadata
impl Sync for TypedMetadata
impl Unpin for TypedMetadata
impl UnsafeUnpin for TypedMetadata
impl UnwindSafe for TypedMetadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more