pub struct RobotsDirective { /* private fields */ }Expand description
A robots directive set suitable for meta content formatting.
Implementations§
Source§impl RobotsDirective
impl RobotsDirective
Sourcepub const fn new(index: IndexDirective, follow: FollowDirective) -> Self
pub const fn new(index: IndexDirective, follow: FollowDirective) -> Self
Creates a robots directive from index and follow directives.
Sourcepub const fn index_follow() -> Self
pub const fn index_follow() -> Self
Common index,follow directive.
Sourcepub const fn noindex_nofollow() -> Self
pub const fn noindex_nofollow() -> Self
Common noindex,nofollow directive.
Sourcepub const fn with_snippet(self, snippet: SnippetDirective) -> Self
pub const fn with_snippet(self, snippet: SnippetDirective) -> Self
Sets the snippet directive.
Sourcepub const fn with_archive(self, archive: ArchiveDirective) -> Self
pub const fn with_archive(self, archive: ArchiveDirective) -> Self
Sets the archive directive.
Sourcepub const fn index(&self) -> IndexDirective
pub const fn index(&self) -> IndexDirective
Returns the index directive.
Sourcepub const fn follow(&self) -> FollowDirective
pub const fn follow(&self) -> FollowDirective
Returns the follow directive.
Sourcepub fn to_meta_content(&self) -> String
pub fn to_meta_content(&self) -> String
Formats this directive as a robots meta content value.
Trait Implementations§
Source§impl Clone for RobotsDirective
impl Clone for RobotsDirective
Source§fn clone(&self) -> RobotsDirective
fn clone(&self) -> RobotsDirective
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RobotsDirective
impl Debug for RobotsDirective
Source§impl PartialEq for RobotsDirective
impl PartialEq for RobotsDirective
Source§fn eq(&self, other: &RobotsDirective) -> bool
fn eq(&self, other: &RobotsDirective) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for RobotsDirective
impl StructuralPartialEq for RobotsDirective
Auto Trait Implementations§
impl Freeze for RobotsDirective
impl RefUnwindSafe for RobotsDirective
impl Send for RobotsDirective
impl Sync for RobotsDirective
impl Unpin for RobotsDirective
impl UnsafeUnpin for RobotsDirective
impl UnwindSafe for RobotsDirective
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