pub struct LogicalName { /* private fields */ }Expand description
One separator-free canonical logical name.
Implementations§
Source§impl LogicalName
impl LogicalName
Sourcepub fn new(
encoding: NameEncoding,
bytes: Vec<u8>,
maximum_bytes: u32,
) -> Result<Self, TreePageError>
pub fn new( encoding: NameEncoding, bytes: Vec<u8>, maximum_bytes: u32, ) -> Result<Self, TreePageError>
Validates a bounded name in its declared host representation.
§Errors
Rejects empty, oversized, malformed, NUL, or separator-bearing names.
Sourcepub const fn encoding(&self) -> NameEncoding
pub const fn encoding(&self) -> NameEncoding
Returns the canonical representation kind.
Sourcepub fn unicode_text(&self) -> Option<Cow<'_, str>>
pub fn unicode_text(&self) -> Option<Cow<'_, str>>
Presents this exact name as Unicode when its host encoding permits it. Raw POSIX names outside UTF-8 remain unrepresentable as strings.
Sourcepub fn case_fold_key(&self) -> Vec<u8> ⓘ
pub fn case_fold_key(&self) -> Vec<u8> ⓘ
Comparison key for CaseSensitivity::ProfileFolded lookup and
collision detection.
Only NameEncoding::Utf8 names are folded (via full Unicode
case-folding, str::to_lowercase); other encodings return their raw
bytes unchanged, so ProfileFolded behaves like Sensitive for
PosixBytes/WindowsUtf16Le names. This never changes the physical,
byte-ordered on-disk representation — it is a comparison-only key used
by callers that already hold the name, not a new canonical form.
Trait Implementations§
Source§impl Clone for LogicalName
impl Clone for LogicalName
Source§impl Debug for LogicalName
impl Debug for LogicalName
impl Eq for LogicalName
Source§impl Ord for LogicalName
impl Ord for LogicalName
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for LogicalName
impl PartialEq for LogicalName
Source§impl PartialOrd for LogicalName
impl PartialOrd for LogicalName
impl StructuralPartialEq for LogicalName
Auto Trait Implementations§
impl Freeze for LogicalName
impl RefUnwindSafe for LogicalName
impl Send for LogicalName
impl Sync for LogicalName
impl Unpin for LogicalName
impl UnsafeUnpin for LogicalName
impl UnwindSafe for LogicalName
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
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request