Struct fidl_fuchsia_fxfs::ProjectIdProxy
source · pub struct ProjectIdProxy { /* private fields */ }
Implementations§
source§impl ProjectIdProxy
impl ProjectIdProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.fxfs/ProjectId.
sourcepub fn take_event_stream(&self) -> ProjectIdEventStream
pub fn take_event_stream(&self) -> ProjectIdEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn set_limit(
&self,
project_id: u64,
bytes: u64,
nodes: u64,
) -> QueryResponseFut<ProjectIdSetLimitResult>
pub fn set_limit( &self, project_id: u64, bytes: u64, nodes: u64, ) -> QueryResponseFut<ProjectIdSetLimitResult>
Set the limit in bytes and node count for an XFS project id. Setting limits lower than
current usage is accepted but may in the future prevent further increases. Returns
ZX_ERR_OUT_OF_RANGE if project_id
is set to zero.
sourcepub fn clear(&self, project_id: u64) -> QueryResponseFut<ProjectIdClearResult>
pub fn clear(&self, project_id: u64) -> QueryResponseFut<ProjectIdClearResult>
Stop tracking a project id. This will return ZX_ERR_NOT_FOUND if the project isn’t currently tracked. It will succeed even if the project is still in use more by one or more nodes.
sourcepub fn set_for_node(
&self,
node_id: u64,
project_id: u64,
) -> QueryResponseFut<ProjectIdSetForNodeResult>
pub fn set_for_node( &self, node_id: u64, project_id: u64, ) -> QueryResponseFut<ProjectIdSetForNodeResult>
Apply project id to a node_id from a GetAttrs call. This will return ZX_ERR_NOT_FOUND if
node doesn’t exist, ZX_ERR_ALREADY_EXISTS if there is already a project_id
applied to
the node, and ZX_ERR_OUT_OF_RANGE if project_id
is set to zero.
sourcepub fn get_for_node(
&self,
node_id: u64,
) -> QueryResponseFut<ProjectIdGetForNodeResult>
pub fn get_for_node( &self, node_id: u64, ) -> QueryResponseFut<ProjectIdGetForNodeResult>
Get the project id based on a given node_id from a GetAttrs call.This will return
ZX_ERR_NOT_FOUND if the node doesn’t exist, and a project_id
of zero if one is not
currently applied.
sourcepub fn clear_for_node(
&self,
node_id: u64,
) -> QueryResponseFut<ProjectIdClearForNodeResult>
pub fn clear_for_node( &self, node_id: u64, ) -> QueryResponseFut<ProjectIdClearForNodeResult>
Remove any project id marker for a given node_id from a GetAttrs call. This will return ZX_ERR_NOT_FOUND if the node doesn’t exist, or success if the node is found to currently have no project id applied to it.
sourcepub fn list(
&self,
token: Option<&ProjectIterToken>,
) -> QueryResponseFut<ProjectIdListResult>
pub fn list( &self, token: Option<&ProjectIterToken>, ) -> QueryResponseFut<ProjectIdListResult>
Fetches project id numbers currently tracked with a limit or with non-zero usage from lowest
to highest. If token
is null, start at the beginning, if token
is populated with a
previously provided next_token
the iteration continues where it left off. If there are
more projects to be listed then next_token
will be populated, otherwise it will be null.
sourcepub fn info(&self, project_id: u64) -> QueryResponseFut<ProjectIdInfoResult>
pub fn info(&self, project_id: u64) -> QueryResponseFut<ProjectIdInfoResult>
Looks up the limit and usage for a tracked project_id
. If the project_id
does not have
a limit set, or non-zero usage it will return ZX_ERR_NOT_FOUND.
Trait Implementations§
source§impl Clone for ProjectIdProxy
impl Clone for ProjectIdProxy
source§fn clone(&self) -> ProjectIdProxy
fn clone(&self) -> ProjectIdProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProjectIdProxy
impl Debug for ProjectIdProxy
source§impl ProjectIdProxyInterface for ProjectIdProxy
impl ProjectIdProxyInterface for ProjectIdProxy
type SetLimitResponseFut = QueryResponseFut<Result<(), i32>>
fn set_limit( &self, project_id: u64, bytes: u64, nodes: u64, ) -> Self::SetLimitResponseFut
type ClearResponseFut = QueryResponseFut<Result<(), i32>>
fn clear(&self, project_id: u64) -> Self::ClearResponseFut
type SetForNodeResponseFut = QueryResponseFut<Result<(), i32>>
fn set_for_node( &self, node_id: u64, project_id: u64, ) -> Self::SetForNodeResponseFut
type GetForNodeResponseFut = QueryResponseFut<Result<u64, i32>>
fn get_for_node(&self, node_id: u64) -> Self::GetForNodeResponseFut
type ClearForNodeResponseFut = QueryResponseFut<Result<(), i32>>
fn clear_for_node(&self, node_id: u64) -> Self::ClearForNodeResponseFut
type ListResponseFut = QueryResponseFut<Result<(Vec<u64>, Option<Box<ProjectIterToken>>), i32>>
fn list(&self, token: Option<&ProjectIterToken>) -> Self::ListResponseFut
type InfoResponseFut = QueryResponseFut<Result<(BytesAndNodes, BytesAndNodes), i32>>
fn info(&self, project_id: u64) -> Self::InfoResponseFut
source§impl Proxy for ProjectIdProxy
impl Proxy for ProjectIdProxy
§type Protocol = ProjectIdMarker
type Protocol = ProjectIdMarker
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Auto Trait Implementations§
impl Freeze for ProjectIdProxy
impl !RefUnwindSafe for ProjectIdProxy
impl Send for ProjectIdProxy
impl Sync for ProjectIdProxy
impl Unpin for ProjectIdProxy
impl !UnwindSafe for ProjectIdProxy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)