pub struct AttributeBuilder<'a> { /* private fields */ }
Expand description
Utility struct for constructing Attributes.
Implementations§
Source§impl<'a> AttributeBuilder<'a>
impl<'a> AttributeBuilder<'a>
Sourcepub fn new<S: Into<String>>(name: S) -> Self
pub fn new<S: Into<String>>(name: S) -> Self
Create a new attribute with the given name. The name must be unique.
Sourcepub fn values(self, values: &[Option<&str>]) -> Self
pub fn values(self, values: &[Option<&str>]) -> Self
Set the values of this attribute. The order of the values must be consistent with the order of the documents as passed to Training.
Auto Trait Implementations§
impl<'a> Freeze for AttributeBuilder<'a>
impl<'a> !RefUnwindSafe for AttributeBuilder<'a>
impl<'a> !Send for AttributeBuilder<'a>
impl<'a> !Sync for AttributeBuilder<'a>
impl<'a> Unpin for AttributeBuilder<'a>
impl<'a> !UnwindSafe for AttributeBuilder<'a>
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