pub struct CanonicalInput {
pub modality: Modality,
pub payload: Payload,
}Expand description
Adapter output and tokenizer input: one record of canonical information.
Fields§
§modality: Modality§payload: PayloadImplementations§
Source§impl CanonicalInput
impl CanonicalInput
pub fn bytes(modality: Modality, bytes: impl Into<Vec<u8>>) -> CanonicalInput
pub fn text(text: &str) -> CanonicalInput
pub fn symbols<I, S>(symbols: I) -> CanonicalInput
Trait Implementations§
Source§impl Clone for CanonicalInput
impl Clone for CanonicalInput
Source§fn clone(&self) -> CanonicalInput
fn clone(&self) -> CanonicalInput
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 CanonicalInput
impl Debug for CanonicalInput
impl Eq for CanonicalInput
Source§impl PartialEq for CanonicalInput
impl PartialEq for CanonicalInput
impl StructuralPartialEq for CanonicalInput
Auto Trait Implementations§
impl Forget for CanonicalInput
impl Freeze for CanonicalInput
impl Move for CanonicalInput
impl RefUnwindSafe for CanonicalInput
impl Send for CanonicalInput
impl Sync for CanonicalInput
impl Unpin for CanonicalInput
impl UnsafeUnpin for CanonicalInput
impl UnwindSafe for CanonicalInput
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<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