Struct vnd_siren::link::LinkBuilder
source · pub struct LinkBuilder { /* private fields */ }
Implementations
sourceimpl LinkBuilder
impl LinkBuilder
sourcepub fn class(self, class: impl Into<String>) -> Self
pub fn class(self, class: impl Into<String>) -> Self
Add a Class to the Link.
Examples
let link: Link = Link::builder(vec!["self"], "http://api.x.io/orders/42")
.class("item").into();
assert_eq!(&Some(vec!["item".to_string()]), link.classes());
sourcepub fn classes(self, classes: Vec<impl Into<String>>) -> Self
pub fn classes(self, classes: Vec<impl Into<String>>) -> Self
Add a vector of Classes to the Link.
Examples
let link: Link = Link::builder(vec!["self"], "http://api.x.io/orders/42")
.classes(vec!["item"]).into();
assert_eq!(&Some(vec!["item".to_string()]), link.classes());
Trait Implementations
sourceimpl Clone for LinkBuilder
impl Clone for LinkBuilder
sourcefn clone(&self) -> LinkBuilder
fn clone(&self) -> LinkBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for LinkBuilder
impl Debug for LinkBuilder
sourceimpl From<LinkBuilder> for Link
impl From<LinkBuilder> for Link
sourcefn from(builder: LinkBuilder) -> Link
fn from(builder: LinkBuilder) -> Link
Converts to this type from the input type.
sourceimpl PartialEq<LinkBuilder> for LinkBuilder
impl PartialEq<LinkBuilder> for LinkBuilder
sourcefn eq(&self, other: &LinkBuilder) -> bool
fn eq(&self, other: &LinkBuilder) -> bool
impl StructuralPartialEq for LinkBuilder
Auto Trait Implementations
impl RefUnwindSafe for LinkBuilder
impl Send for LinkBuilder
impl Sync for LinkBuilder
impl Unpin for LinkBuilder
impl UnwindSafe for LinkBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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