pub struct TextCollator { /* private fields */ }Expand description
Stateless deterministic collator for encoded sequences.
Implementations§
Source§impl TextCollator
impl TextCollator
Sourcepub fn new(padding: Padding, limits: ResourceLimits) -> Result<Self>
pub fn new(padding: Padding, limits: ResourceLimits) -> Result<Self>
Validates the fixed padding width against the token ceiling.
Trait Implementations§
Source§impl Checkpointable for TextCollator
impl Checkpointable for TextCollator
Source§type State = (Padding, ResourceLimits)
type State = (Padding, ResourceLimits)
Owned serializable component state.
Source§fn save_state(&self) -> Self::State
fn save_state(&self) -> Self::State
Captures the current component state.
Source§fn validate_state(&self, s: &Self::State) -> Result<()>
fn validate_state(&self, s: &Self::State) -> Result<()>
Checks state compatibility without mutating the component.
Source§fn load_validated(&mut self, _: &Self::State)
fn load_validated(&mut self, _: &Self::State)
Restores state previously accepted by
Self::validate_state.Source§impl Clone for TextCollator
impl Clone for TextCollator
Source§impl Collate<EncodedSequence> for TextCollator
impl Collate<EncodedSequence> for TextCollator
impl Copy for TextCollator
Auto Trait Implementations§
impl Forget for TextCollator
impl Freeze for TextCollator
impl RefUnwindSafe for TextCollator
impl Send for TextCollator
impl Sync for TextCollator
impl Unpin for TextCollator
impl UnsafeUnpin for TextCollator
impl UnwindSafe for TextCollator
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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