Skip to main content

Standard

Struct Standard 

Source
pub struct Standard<O: Options = Default>(/* private fields */);
Expand description

Defines a standard boundary implementation.

This type is configurable over Options types, but it assumes the Default options when another options type is not provided.

For a description of how boundaries are formed in this implementation, see the boundary module documentation.

Trait Implementations§

Source§

impl<O: Options> Boundary for Standard<O>

Source§

const CAN_FIND_BOUNDARIES: bool

Whether or not this boundary definition could ever find a boundary within any provided, valid chunk. Read more
Source§

fn find_boundary<S: Segmentation>(chunk: &str) -> Option<NonZero<usize>>

Finds the next index that a boundary should be introduced on. Read more
Source§

fn rfind_boundary<S: Segmentation>(chunk: &str) -> Option<NonZero<usize>>

Finds the next index from the back of the string that a boundary should be introduced on. Read more
Source§

fn has_boundary_at<S: Segmentation>(chunk: &str, idx: usize) -> bool

Returns whether a boundary exists at a given byte offset of a string. Read more

Auto Trait Implementations§

§

impl<O> Freeze for Standard<O>
where PhantomData<O>: Freeze,

§

impl<O> RefUnwindSafe for Standard<O>

§

impl<O> Send for Standard<O>
where PhantomData<O>: Send,

§

impl<O> Sync for Standard<O>
where PhantomData<O>: Sync,

§

impl<O> Unpin for Standard<O>
where PhantomData<O>: Unpin,

§

impl<O> UnsafeUnpin for Standard<O>

§

impl<O> UnwindSafe for Standard<O>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.