⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

TicketCache

Struct TicketCache 

Source
pub struct TicketCache { /* private fields */ }
Expand description

In-memory Kerberos ticket cache.

Provides store/lookup/remove operations with automatic expiry purging.

Implementations§

Source§

impl TicketCache

Source

pub fn new() -> Self

Create a new empty ticket cache.

Source

pub fn set_default_principal(&mut self, principal: PrincipalName)

Set the default principal.

Source

pub fn default_principal(&self) -> Option<&PrincipalName>

Get the default principal.

Source

pub fn store_ticket(&mut self, entry: CcacheEntry)

Store a ticket in the cache.

If a ticket for the same server principal already exists, it is replaced.

Source

pub fn lookup_ticket(&self, server: &PrincipalName) -> Option<&CcacheEntry>

Look up a ticket by server principal.

Source

pub fn remove_ticket(&mut self, server: &PrincipalName) -> bool

Remove a ticket by server principal.

Source

pub fn purge_expired(&mut self) -> usize

Remove all expired tickets.

Source

pub fn list_tickets(&self) -> &[CcacheEntry]

List all cached tickets with metadata.

Source

pub fn len(&self) -> usize

Get the number of cached tickets.

Source

pub fn is_empty(&self) -> bool

Check if the cache is empty.

Source

pub fn clear(&mut self)

Clear all entries (kdestroy).

Source

pub fn serialize(&self) -> Option<Vec<u8>>

Export to ccache binary format.

Source

pub fn deserialize(data: &[u8]) -> Result<Self, KernelError>

Import from ccache binary format.

Trait Implementations§

Source§

impl Default for TicketCache

Available on crate feature alloc only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for TicketCache

§

impl RefUnwindSafe for TicketCache

§

impl Send for TicketCache

§

impl Sync for TicketCache

§

impl Unpin for TicketCache

§

impl UnwindSafe for TicketCache

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.